Skip to content

Commit

Permalink
Resolve noop_method_call warnings for rust 1.73+
Browse files Browse the repository at this point in the history
- Rust compiler added warnings to noop method calls (redundant calls that do nothing)
- These changes take rust compiler recommendations and accomodate them to silence warnings
  • Loading branch information
who-biz committed Oct 16, 2023
1 parent da04eeb commit 569961e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,7 @@ impl GlobalConfig {
}
Err(e) => {
return Err(ConfigError::ParseError(
String::from(
self.config_file_path
.as_mut()
.unwrap()
.to_str()
.unwrap()
.clone(),
),
String::from(self.config_file_path.as_mut().unwrap().to_str().unwrap()),
String::from(format!("{}", e)),
));
}
Expand Down
2 changes: 1 addition & 1 deletion servers/src/epic/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl Server {
// This uses fs2 and should be safe cross-platform unless somebody abuses the file itself.
fn one_epic_at_a_time(config: &ServerConfig) -> Result<Arc<File>, Error> {
let path = Path::new(&config.db_root);
fs::create_dir_all(path.clone())?;
fs::create_dir_all(path)?;
let path = path.join("epic.lock");
let lock_file = fs::OpenOptions::new()
.read(true)
Expand Down
2 changes: 1 addition & 1 deletion src/bin/epic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ fn real_main() -> i32 {
panic!("The generate value must be a positive integer: {}", e);
});

let url = taxes_args.value_of("from_wallet").unwrap().clone();
let url = taxes_args.value_of("from_wallet").unwrap();
let mut wallet_url = String::new();
if !url.contains("http") {
wallet_url.push_str("http://");
Expand Down

0 comments on commit 569961e

Please sign in to comment.