fix: Builds failing due to new Rust version

This commit is contained in:
Gerald Pinder 2024-07-26 15:44:29 -04:00
parent 7481ac1825
commit e36bb74231
4 changed files with 13 additions and 15 deletions

View file

@ -37,7 +37,7 @@ perf = "warn"
style = "warn"
nursery = "warn"
pedantic = "warn"
module_name_repetitions = "allow"
module_name_repetitions = { level = "allow", priority = 1 }
[package]
name = "blue-build"

View file

@ -14,12 +14,11 @@ fn main() {
log::trace!("Parsed arguments: {args:#?}");
signal_handler::init(|| match args.command {
#[cfg(feature = "init")]
CommandArgs::Init(mut command) => command.run(),
#[cfg(feature = "init")]
CommandArgs::New(mut command) => command.run(),
// #[cfg(feature = "init")]
// CommandArgs::Init(mut command) => command.run(),
// #[cfg(feature = "init")]
// CommandArgs::New(mut command) => command.run(),
CommandArgs::Build(mut command) => command.run(),
CommandArgs::Generate(mut command) => command.run(),

View file

@ -15,8 +15,8 @@ pub mod bug_report;
pub mod build;
pub mod completions;
pub mod generate;
#[cfg(feature = "init")]
pub mod init;
// #[cfg(feature = "init")]
// pub mod init;
#[cfg(not(feature = "switch"))]
pub mod local;
#[cfg(feature = "switch")]
@ -107,13 +107,12 @@ pub enum CommandArgs {
#[cfg(feature = "switch")]
Switch(switch::SwitchCommand),
/// Initialize a new Ublue Starting Point repo
#[cfg(feature = "init")]
Init(init::InitCommand),
#[cfg(feature = "init")]
New(init::NewCommand),
// /// Initialize a new Ublue Starting Point repo
// #[cfg(feature = "init")]
// Init(init::InitCommand),
// #[cfg(feature = "init")]
// New(init::NewCommand),
/// Create a pre-populated GitHub issue with information about your configuration
BugReport(bug_report::BugReportCommand),

View file

@ -85,7 +85,7 @@ impl Logger {
///
/// # Panics
/// Will panic if logging is unable to be initialized.
pub fn init(&mut self) {
pub fn init(&self) {
let home = env::var("HOME").expect("$HOME should be defined");
let log_dir = self.log_dir.as_ref().map_or_else(
|| Path::new(home.as_str()).join(".local/share/bluebuild"),