Skip to content
Snippets Groups Projects
Commit 84e3eea3 authored by Gilles Filippini's avatar Gilles Filippini
Browse files

chore: fix fmt_and_clippy CI failures

parent 58760841
No related branches found
No related tags found
1 merge request!1411chore: fix fmt_and_clippy and cargo-deny CI failures
Pipeline #19036 failed
......@@ -76,7 +76,7 @@ fn main() -> anyhow::Result<()> {
"duniter_default".to_owned()
};
let profile_path = home.as_path().join(&profile_name);
let profile_path = home.as_path().join(profile_name);
let data_path = profile_path.as_path().join(DATA_DIR);
if !data_path.exists() {
......@@ -323,11 +323,11 @@ fn too_many_entries(entries_len: usize, output_in_term: bool) -> std::io::Result
fn show_db_schema(collections_names: Vec<(&'static str, &'static str, &'static str)>) {
let mut table = Table::new();
table.set_content_arrangement(comfy_table::ContentArrangement::Dynamic);
table.set_header(&["Collection name", "Key type", "Value type"]);
table.set_header(["Collection name", "Key type", "Value type"]);
for (collection_name, key_full_type_name, value_full_type_name) in collections_names {
let key_type_name_opt = key_full_type_name.split(':').last();
let value_type_name_opt = value_full_type_name.split(':').last();
table.add_row(&[
table.add_row([
collection_name,
key_type_name_opt.unwrap_or("?"),
value_type_name_opt.unwrap_or("?"),
......
......@@ -44,7 +44,7 @@ fn main() -> Result<()> {
let args = DuniterXTask::from_args();
if !version_check::is_min_version(MIN_RUST_VERSION).unwrap_or(false)
&& exec_should_success(Command::new("rustup").args(&["update", "stable"])).is_err()
&& exec_should_success(Command::new("rustup").args(["update", "stable"])).is_err()
{
eprintln!(
"Duniter requires Rust {} or higher. If you installed the Rust toolchain via rustup, please execute the command `rustup update stable`.",
......@@ -110,24 +110,24 @@ fn exec_should_success(command: &mut Command) -> Result<()> {
fn build(skip_npm: bool, production: bool) -> Result<()> {
if !skip_npm {
exec_should_success(Command::new("npm").args(&["add", "duniter-ui"]))?;
exec_should_success(Command::new("npm").args(["add", "duniter-ui"]))?;
exec_should_success(
Command::new("npm")
.env("NEON_BUILD_RELEASE", "true")
.arg("ci"),
)?;
if production {
exec_should_success(Command::new("npm").args(&["prune", "--production"]))?;
exec_should_success(Command::new("npm").args(["prune", "--production"]))?;
}
}
println!("Build duniter-cli …");
exec_should_success(Command::new("cargo").args(&["build", "--release"]))?;
exec_should_success(Command::new("cargo").args(["build", "--release"]))?;
std::fs::copy("target/release/duniter", "bin/duniter")?;
Ok(())
}
fn test(skip_npm: bool) -> Result<()> {
exec_should_success(Command::new("cargo").args(&["test", "--all"]))?;
exec_should_success(Command::new("cargo").args(["test", "--all"]))?;
if !skip_npm {
exec_should_success(Command::new("npm").arg("test"))?;
}
......
......@@ -62,7 +62,7 @@ impl DuniterServer {
}
}
}
Ok(new_pending_txs.into_iter().map(|(_k, v)| v).collect())
Ok(new_pending_txs.into_values().collect())
}
pub fn get_pending_txs(
&self,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment