Skip to content

Implement round trip dumping of the new object format #447

Implement round trip dumping of the new object format

Implement round trip dumping of the new object format #447

Triggered via push January 30, 2025 03:02
Status Success
Total duration 5m 48s
Artifacts

rust-build.yml

on: push
build_default_linux
5m 39s
build_default_linux
build_all_linux
5m 32s
build_all_linux
build_default_macos
5m 8s
build_default_macos
clippy_check
2m 8s
clippy_check
Fit to window
Zoom out
Zoom in

Annotations

22 warnings
this `map_or` is redundant: crates/web-host/src/main.rs#L313
warning: this `map_or` is redundant --> crates/web-host/src/main.rs:313:16 | 313 | if path.file_name().map_or(false, |name| name == "moor.ts") { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `path.file_name().is_some_and(|name| name == "moor.ts")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
this `map_or` is redundant: crates/web-host/src/main.rs#L312
warning: this `map_or` is redundant --> crates/web-host/src/main.rs:312:12 | 312 | if path.extension().map_or(false, |ext| ext == "ts") { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `path.extension().is_some_and(|ext| ext == "ts")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or = note: `#[warn(clippy::unnecessary_map_or)]` on by default
calling `push_str()` using a single-character string literal: crates/kernel/src/objdef/dump.rs#L277
warning: calling `push_str()` using a single-character string literal --> crates/kernel/src/objdef/dump.rs:277:13 | 277 | objstr.push_str("\n"); | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `objstr.push('\n')` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
calling `push_str()` using a single-character string literal: crates/kernel/src/objdef/dump.rs#L258
warning: calling `push_str()` using a single-character string literal --> crates/kernel/src/objdef/dump.rs:258:13 | 258 | objstr.push_str("\n"); | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `objstr.push('\n')` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
calling `push_str()` using a single-character string literal: crates/kernel/src/objdef/dump.rs#L239
warning: calling `push_str()` using a single-character string literal --> crates/kernel/src/objdef/dump.rs:239:13 | 239 | objstr.push_str("\n"); | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `objstr.push('\n')` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str = note: `#[warn(clippy::single_char_add_str)]` on by default
this `if` has identical blocks: crates/kernel/src/objdef/dump.rs#L96
warning: this `if` has identical blocks --> crates/kernel/src/objdef/dump.rs:96:21 | 96 | / { 97 | | perms_update = None; 98 | | } else if perms.eq(&definer_perms) { | |_____________________^ | note: same as this --> crates/kernel/src/objdef/dump.rs:98:56 | 98 | } else if perms.eq(&definer_perms) { | ________________________________________________________^ 99 | | perms_update = None; 100 | | } | |_____________________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else = note: `#[warn(clippy::if_same_then_else)]` on by default
deref which would be done by auto-deref: crates/kernel/src/objdef/dump.rs#L63
warning: deref which would be done by auto-deref --> crates/kernel/src/objdef/dump.rs:63:60 | 63 | names: v.names().iter().map(|s| Symbol::mk(*s)).collect(), | ^^ help: try: `s` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref = note: `#[warn(clippy::explicit_auto_deref)]` on by default
calls to `push` immediately after creation: crates/kernel/src/builtins/bf_list_sets.rs#L371
warning: calls to `push` immediately after creation --> crates/kernel/src/builtins/bf_list_sets.rs:371:17 | 371 | / let mut match_list = vec![]; 372 | | match_list.push(v_list(&[v_str("match"), v_str(&target[start..end])])); 373 | | match_list.push(v_list(&[ 374 | | v_str("position"), 375 | | v_list(&[v_int((start as i64) + 1), v_int(end as i64)]), 376 | | ])); | |____________________^ help: consider using the `vec![]` macro: `let match_list = vec![..];` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
calls to `push` immediately after creation: crates/kernel/src/builtins/bf_list_sets.rs#L356
warning: calls to `push` immediately after creation --> crates/kernel/src/builtins/bf_list_sets.rs:356:17 | 356 | / let mut match_map = vec![]; 357 | | match_map.push((v_str("match"), v_str(&target[start..end]))); 358 | | match_map.push(( 359 | | v_str("position"), 360 | | v_list(&[v_int((start as i64) + 1), v_int(end as i64)]), 361 | | )); | |___________________^ help: consider using the `vec![]` macro: `let match_map = vec![..];` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push = note: `#[warn(clippy::vec_init_then_push)]` on by default
use of a fallible conversion when an infallible one could be used: crates/rpc/rpc-common/src/lib.rs#L330
warning: use of a fallible conversion when an infallible one could be used --> crates/rpc/rpc-common/src/lib.rs:330:28 | 330 | let pub_key: Key<32> = Key::try_from(public_key.to_bytes()) | ^^^^^^^^^^^^^ help: use: `From::from` | = note: converting `[u8; 32]` to `Key<32>` cannot fail = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
use of a fallible conversion when an infallible one could be used: crates/rpc/rpc-common/src/lib.rs#L328
warning: use of a fallible conversion when an infallible one could be used --> crates/rpc/rpc-common/src/lib.rs:328:29 | 328 | let priv_key: Key<64> = Key::try_from(private_key.to_keypair_bytes()) | ^^^^^^^^^^^^^ help: use: `From::from` | = note: converting `[u8; 64]` to `Key<64>` cannot fail = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default
this `map_or` is redundant: crates/web-host/src/main.rs#L313
warning: this `map_or` is redundant --> crates/web-host/src/main.rs:313:16 | 313 | if path.file_name().map_or(false, |name| name == "moor.ts") { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `path.file_name().is_some_and(|name| name == "moor.ts")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
this `map_or` is redundant: crates/web-host/src/main.rs#L312
warning: this `map_or` is redundant --> crates/web-host/src/main.rs:312:12 | 312 | if path.extension().map_or(false, |ext| ext == "ts") { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `path.extension().is_some_and(|ext| ext == "ts")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or = note: `#[warn(clippy::unnecessary_map_or)]` on by default
calling `push_str()` using a single-character string literal: crates/kernel/src/objdef/dump.rs#L277
warning: calling `push_str()` using a single-character string literal --> crates/kernel/src/objdef/dump.rs:277:13 | 277 | objstr.push_str("\n"); | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `objstr.push('\n')` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
calling `push_str()` using a single-character string literal: crates/kernel/src/objdef/dump.rs#L258
warning: calling `push_str()` using a single-character string literal --> crates/kernel/src/objdef/dump.rs:258:13 | 258 | objstr.push_str("\n"); | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `objstr.push('\n')` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
calling `push_str()` using a single-character string literal: crates/kernel/src/objdef/dump.rs#L239
warning: calling `push_str()` using a single-character string literal --> crates/kernel/src/objdef/dump.rs:239:13 | 239 | objstr.push_str("\n"); | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `objstr.push('\n')` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str = note: `#[warn(clippy::single_char_add_str)]` on by default
this `if` has identical blocks: crates/kernel/src/objdef/dump.rs#L96
warning: this `if` has identical blocks --> crates/kernel/src/objdef/dump.rs:96:21 | 96 | / { 97 | | perms_update = None; 98 | | } else if perms.eq(&definer_perms) { | |_____________________^ | note: same as this --> crates/kernel/src/objdef/dump.rs:98:56 | 98 | } else if perms.eq(&definer_perms) { | ________________________________________________________^ 99 | | perms_update = None; 100 | | } | |_____________________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else = note: `#[warn(clippy::if_same_then_else)]` on by default
deref which would be done by auto-deref: crates/kernel/src/objdef/dump.rs#L63
warning: deref which would be done by auto-deref --> crates/kernel/src/objdef/dump.rs:63:60 | 63 | names: v.names().iter().map(|s| Symbol::mk(*s)).collect(), | ^^ help: try: `s` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref = note: `#[warn(clippy::explicit_auto_deref)]` on by default
calls to `push` immediately after creation: crates/kernel/src/builtins/bf_list_sets.rs#L371
warning: calls to `push` immediately after creation --> crates/kernel/src/builtins/bf_list_sets.rs:371:17 | 371 | / let mut match_list = vec![]; 372 | | match_list.push(v_list(&[v_str("match"), v_str(&target[start..end])])); 373 | | match_list.push(v_list(&[ 374 | | v_str("position"), 375 | | v_list(&[v_int((start as i64) + 1), v_int(end as i64)]), 376 | | ])); | |____________________^ help: consider using the `vec![]` macro: `let match_list = vec![..];` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
calls to `push` immediately after creation: crates/kernel/src/builtins/bf_list_sets.rs#L356
warning: calls to `push` immediately after creation --> crates/kernel/src/builtins/bf_list_sets.rs:356:17 | 356 | / let mut match_map = vec![]; 357 | | match_map.push((v_str("match"), v_str(&target[start..end]))); 358 | | match_map.push(( 359 | | v_str("position"), 360 | | v_list(&[v_int((start as i64) + 1), v_int(end as i64)]), 361 | | )); | |___________________^ help: consider using the `vec![]` macro: `let match_map = vec![..];` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push = note: `#[warn(clippy::vec_init_then_push)]` on by default
use of a fallible conversion when an infallible one could be used: crates/rpc/rpc-common/src/lib.rs#L330
warning: use of a fallible conversion when an infallible one could be used --> crates/rpc/rpc-common/src/lib.rs:330:28 | 330 | let pub_key: Key<32> = Key::try_from(public_key.to_bytes()) | ^^^^^^^^^^^^^ help: use: `From::from` | = note: converting `[u8; 32]` to `Key<32>` cannot fail = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
use of a fallible conversion when an infallible one could be used: crates/rpc/rpc-common/src/lib.rs#L328
warning: use of a fallible conversion when an infallible one could be used --> crates/rpc/rpc-common/src/lib.rs:328:29 | 328 | let priv_key: Key<64> = Key::try_from(private_key.to_keypair_bytes()) | ^^^^^^^^^^^^^ help: use: `From::from` | = note: converting `[u8; 64]` to `Key<64>` cannot fail = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default