Run clippy --fix for updated lint requirements (#43)
This commit is contained in:
parent
67e5aef69a
commit
4c71e135ab
|
@ -139,7 +139,7 @@ fn main() -> std::result::Result<(), Box<dyn Error>> {
|
|||
}
|
||||
Err(e) => {
|
||||
let mut out = std::io::stderr();
|
||||
write!(out, "{:?}", e).unwrap();
|
||||
write!(out, "{e:?}").unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ fn main() -> std::result::Result<(), Box<dyn Error>> {
|
|||
app.node_handle.stop()?;
|
||||
|
||||
if let Err(err) = res {
|
||||
println!("{:?}", err)
|
||||
println!("{err:?}")
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ fn run_app<B: Backend>(
|
|||
.relay_publish_message(&waku_message, None, None)
|
||||
{
|
||||
let mut out = std::io::stderr();
|
||||
write!(out, "{:?}", e).unwrap();
|
||||
write!(out, "{e:?}").unwrap();
|
||||
}
|
||||
}
|
||||
KeyCode::Char(c) => {
|
||||
|
|
|
@ -31,7 +31,7 @@ pub enum ProtocolId {
|
|||
|
||||
impl ProtocolId {
|
||||
pub fn as_string_with_version(&self, version: &str) -> String {
|
||||
format!("{}/{}", self, version)
|
||||
format!("{self}/{version}")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ impl Display for ProtocolId {
|
|||
#[allow(unreachable_patterns)]
|
||||
_ => unreachable!(),
|
||||
};
|
||||
write!(f, "{}", tag)
|
||||
write!(f, "{tag}")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -319,7 +319,7 @@ impl FromStr for Encoding {
|
|||
"proto" => Ok(Self::Proto),
|
||||
"rlp" => Ok(Self::Rlp),
|
||||
"rfc26" => Ok(Self::Rfc26),
|
||||
encoding => Err(format!("Unrecognized encoding: {}", encoding)),
|
||||
encoding => Err(format!("Unrecognized encoding: {encoding}")),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -369,8 +369,7 @@ impl FromStr for WakuContentTopic {
|
|||
} else {
|
||||
Err(
|
||||
format!(
|
||||
"Wrong pub-sub topic format. Should be `/{{application-name}}/{{version-of-the-application}}/{{content-topic-name}}/{{encoding}}`. Got: {}",
|
||||
s
|
||||
"Wrong pub-sub topic format. Should be `/{{application-name}}/{{version-of-the-application}}/{{content-topic-name}}/{{encoding}}`. Got: {s}"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -443,8 +442,7 @@ impl FromStr for WakuPubSubTopic {
|
|||
} else {
|
||||
Err(
|
||||
format!(
|
||||
"Wrong pub-sub topic format. Should be `/waku/2/{{topic-name}}/{{encoding}}`. Got: {}",
|
||||
s
|
||||
"Wrong pub-sub topic format. Should be `/waku/2/{{topic-name}}/{{encoding}}`. Got: {s}"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ impl FromStr for WakuLogLevel {
|
|||
"fatal" => Ok(Self::Fatal),
|
||||
_ => Err(std::io::Error::new(
|
||||
std::io::ErrorKind::InvalidData,
|
||||
format!("Unrecognized waku log level: {}. Allowed values \"DEBUG\", \"INFO\", \"WARN\", \"ERROR\", \"DPANIC\", \"PANIC\", \"FATAL\"", s),
|
||||
format!("Unrecognized waku log level: {s}. Allowed values \"DEBUG\", \"INFO\", \"WARN\", \"ERROR\", \"DPANIC\", \"PANIC\", \"FATAL\""),
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ fn get_go_bin() -> String {
|
|||
Command::new("/usr/bin/which")
|
||||
.arg("go")
|
||||
.output()
|
||||
.map_err(|e| println!("cargo:warning=Couldn't find `which` command: {}", e))
|
||||
.map_err(|e| println!("cargo:warning=Couldn't find `which` command: {e}"))
|
||||
.expect("`which` command not found")
|
||||
.stdout,
|
||||
)
|
||||
|
@ -50,7 +50,7 @@ fn build_go_waku_lib(go_bin: &str, project_dir: &Path) {
|
|||
}
|
||||
|
||||
cmd.status()
|
||||
.map_err(|e| println!("cargo:warning=go build failed due to: {}", e))
|
||||
.map_err(|e| println!("cargo:warning=go build failed due to: {e}"))
|
||||
.unwrap();
|
||||
|
||||
set_current_dir(project_dir).expect("Going back to project dir");
|
||||
|
|
Loading…
Reference in New Issue