Skip to content

Adds a new "flyweight" type - a lightweight object #335

Adds a new "flyweight" type - a lightweight object

Adds a new "flyweight" type - a lightweight object #335

GitHub Actions / clippy failed Dec 8, 2024 in 0s

clippy

1 error, 12 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 1
Warning 12
Note 0
Help 0

Versions

  • rustc 1.83.0 (90b35a623 2024-11-26)
  • cargo 1.83.0 (5ffbef321 2024-10-29)
  • clippy 0.1.83 (90b35a6 2024-11-26)

Annotations

Check warning on line 247 in crates/testing/load-tools/src/tx-list-append.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (9/7)

warning: this function has too many arguments (9/7)
   --> crates/testing/load-tools/src/tx-list-append.rs:237:1
    |
237 | / async fn workload(
238 | |     args: Args,
239 | |     zmq_ctx: tmq::Context,
240 | |     rpc_address: String,
...   |
246 | |     task_results: Arc<Mutex<HashMap<usize, Result<Var, eyre::Report>>>>,
247 | | ) -> Result<Vec<(Instant, WorkItem)>, eyre::Error> {
    | |__________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
    = note: `#[warn(clippy::too_many_arguments)]` on by default

Check failure on line 203 in crates/testing/load-tools/src/verb-dispatch-load-test.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant redefinition of a binding `client_id`

error: redundant redefinition of a binding `client_id`
   --> crates/testing/load-tools/src/verb-dispatch-load-test.rs:203:9
    |
203 |         let client_id = client_id;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
help: `client_id` is initially defined here
   --> crates/testing/load-tools/src/verb-dispatch-load-test.rs:188:9
    |
188 |         client_id,
    |         ^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_locals
    = note: `#[deny(clippy::redundant_locals)]` on by default

Check warning on line 121 in crates/testing/load-tools/src/verb-dispatch-load-test.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (9/7)

warning: this function has too many arguments (9/7)
   --> crates/testing/load-tools/src/verb-dispatch-load-test.rs:111:1
    |
111 | / async fn workload(
112 | |     args: Args,
113 | |     zmq_ctx: tmq::Context,
114 | |     rpc_address: String,
...   |
120 | |     task_results: Arc<Mutex<HashMap<usize, Result<Var, eyre::Report>>>>,
121 | | ) -> Result<Duration, eyre::Error> {
    | |__________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
    = note: `#[warn(clippy::too_many_arguments)]` on by default

Check warning on line 24 in crates/daemon/src/rpc_hosts.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
  --> crates/daemon/src/rpc_hosts.rs:24:18
   |
24 | pub struct Hosts(HashMap<HostToken, (SystemTime, HostType, Vec<(Obj, SocketAddr)>)>);
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
   = note: `#[warn(clippy::type_complexity)]` on by default

Check warning on line 69 in crates/daemon/src/connections_fjall.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

called `unwrap` on `path` after checking its variant with `is_none`

warning: called `unwrap` on `path` after checking its variant with `is_none`
  --> crates/daemon/src/connections_fjall.rs:69:20
   |
64 |         let (tmpdir, path) = if path.is_none() {
   |                              ----------------- help: try: `if let Some(<item>) = path`
...
69 |             (None, path.unwrap().to_path_buf())
   |                    ^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
   = note: `#[warn(clippy::unnecessary_unwrap)]` on by default

Check warning on line 601 in crates/kernel/src/tasks/task.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
   --> crates/kernel/src/tasks/task.rs:601:6
    |
601 | ) -> Result<Option<((Bytes, VerbDef), Obj)>, CommandError> {
    |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
    = note: `#[warn(clippy::type_complexity)]` on by default

Check warning on line 43 in crates/kernel/src/tasks/sessions.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty line after doc comment

warning: empty line after doc comment
  --> crates/kernel/src/tasks/sessions.rs:35:1
   |
35 | / ///
36 | | // TODO: Fix up connected/reconnected/discconnected handling.
37 | | //  Will probably deprecate MOO's concept of 'disconnected' and 'connected' players in the long
38 | | //  run and emulate slack, discord, skype, etc which have a concept of 'presence' (online, offline,
...  |
42 | | //  which is different from MOO's "reconnected" handling, but probably preferable.
43 | |
   | |_
44 |   pub trait Session: Send + Sync {
   |   ------------------------------ the comment documents this trait
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
   = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default
   = help: if the empty line is unintentional remove it
help: if the doc comment should not document `Session` comment it out
   |
23 ~ // /// The interface for managing the user I/O connection side of state, exposed by the scheduler to
24 ~ // /// the VM during execution and by the host server to the scheduler.
25 ~ // ///
26 ~ // /// Because the execution path within the server is transactional, with the scheduler committing
27 ~ // /// and rolling back 'world state' on task commit/rollback, the general expectation is that this
28 ~ // /// entity should *also* perform transactionally, buffering output until the task commits, and
29 ~ // /// throwing it out on rollback. This may or may not be practical for large amounts of output.
30 ~ // ///
31 ~ // /// It is up to the implementation to decide how to buffer output. Options could include a
32 ~ // /// memory mapped file, a full database, or a simple in-memory buffer.
33 ~ // ///
34 ~ // /// Implementations would live in the 'server' host (e.g. websocket connections or repl loop)
35 ~ // ///
   |

Check warning on line 52 in crates/db/src/tx/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variant name ends with the enum's name

warning: variant name ends with the enum's name
  --> crates/db/src/tx/mod.rs:52:5
   |
52 |     EncodingError,
   |     ^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

Check warning on line 50 in crates/db/src/tx/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variant name ends with the enum's name

warning: variant name ends with the enum's name
  --> crates/db/src/tx/mod.rs:50:5
   |
50 |     StoreError,
   |     ^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

Check warning on line 48 in crates/db/src/tx/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variant name ends with the enum's name

warning: variant name ends with the enum's name
  --> crates/db/src/tx/mod.rs:48:5
   |
48 |     RetrieveError,
   |     ^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
   = note: `#[warn(clippy::enum_variant_names)]` on by default

Check warning on line 28 in crates/db/src/tx/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

non-canonical implementation of `partial_cmp` on an `Ord` type

warning: non-canonical implementation of `partial_cmp` on an `Ord` type
  --> crates/db/src/tx/mod.rs:24:1
   |
24 | /  impl PartialOrd for Timestamp {
25 | |      fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
   | | _______________________________________________________________________-
26 | ||         self.0.partial_cmp(&other.0)
27 | ||     }
   | ||_____- help: change this to: `{ Some(self.cmp(other)) }`
28 | |  }
   | |__^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl
   = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default

Check warning on line 75 in crates/db/src/worldstate_transaction.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty line after doc comment

warning: empty line after doc comment
  --> crates/db/src/worldstate_transaction.rs:74:5
   |
74 | /     /// Get the parent of the given object.
75 | |
   | |_
76 |       fn get_object_parent(&self, obj: &Obj) -> Result<Obj, WorldStateError>;
   |       ----------------------------------------------------------------------- the comment documents this method
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
   = help: if the empty line is unintentional remove it

Check warning on line 32 in crates/db/src/loader.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty line after doc comment

warning: empty line after doc comment
  --> crates/db/src/loader.rs:31:1
   |
31 | / /// WorldState could provide, but potentially different constraints/semantics (e.g. no perms checks)
32 | |
   | |_
33 |   pub trait LoaderInterface: Send {
   |   ------------------------------- the comment documents this trait
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
   = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default
   = help: if the empty line is unintentional remove it