Skip to content

Commit

Permalink
fix: Builds failing due to new Rust version
Browse files Browse the repository at this point in the history
  • Loading branch information
gmpinder committed Jul 26, 2024
1 parent 7481ac1 commit e36bb74
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 4 additions & 5 deletions src/bin/bluebuild.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
15 changes: 7 additions & 8 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -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),

Expand Down
2 changes: 1 addition & 1 deletion utils/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit e36bb74

Please sign in to comment.