diff options
| author | mat <git@matdoes.dev> | 2025-12-11 23:21:42 -1030 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-12-11 23:21:42 -1030 |
| commit | ca70e5e321a3c174c53d0650feed84db471ac30d (patch) | |
| tree | 43042fa40c2f3d7f30ea56e1ee84c59dcb13be66 /azalea-client/src | |
| parent | 918214e8ba4eae65daf5d2da17aa0022f2ae5212 (diff) | |
| download | azalea-drasl-ca70e5e321a3c174c53d0650feed84db471ac30d.tar.xz | |
enable str_to_string clippy lint
Diffstat (limited to 'azalea-client/src')
| -rw-r--r-- | azalea-client/src/account.rs | 6 | ||||
| -rw-r--r-- | azalea-client/src/plugins/chat/mod.rs | 4 | ||||
| -rw-r--r-- | azalea-client/src/plugins/disconnect.rs | 2 | ||||
| -rw-r--r-- | azalea-client/src/plugins/task_pool.rs | 6 | ||||
| -rw-r--r-- | azalea-client/src/test_utils/simulation.rs | 5 |
5 files changed, 10 insertions, 13 deletions
diff --git a/azalea-client/src/account.rs b/azalea-client/src/account.rs index faaa551a..ea49368e 100644 --- a/azalea-client/src/account.rs +++ b/azalea-client/src/account.rs @@ -85,11 +85,11 @@ impl Account { /// This is useful for testing in LAN worlds. pub fn offline(username: &str) -> Self { Self { - username: username.to_string(), + username: username.to_owned(), access_token: None, uuid: None, account_opts: AccountOpts::Offline { - username: username.to_string(), + username: username.to_owned(), }, #[cfg(feature = "online-mode")] certs: Arc::new(Mutex::new(None)), @@ -137,7 +137,7 @@ impl Account { access_token: Some(Arc::new(Mutex::new(auth_result.access_token))), uuid: Some(auth_result.profile.id), account_opts: AccountOpts::Microsoft { - email: cache_key.to_string(), + email: cache_key.to_owned(), }, // we don't do chat signing by default unless the user asks for it certs: Arc::new(Mutex::new(None)), diff --git a/azalea-client/src/plugins/chat/mod.rs b/azalea-client/src/plugins/chat/mod.rs index e0a41d49..7fd14e26 100644 --- a/azalea-client/src/plugins/chat/mod.rs +++ b/azalea-client/src/plugins/chat/mod.rs @@ -198,7 +198,7 @@ impl Client { pub fn write_chat_packet(&self, message: &str) { self.ecs.lock().write_message(SendChatKindEvent { entity: self.entity, - content: message.to_string(), + content: message.to_owned(), kind: ChatKind::Message, }); } @@ -211,7 +211,7 @@ impl Client { pub fn write_command_packet(&self, command: &str) { self.ecs.lock().write_message(SendChatKindEvent { entity: self.entity, - content: command.to_string(), + content: command.to_owned(), kind: ChatKind::Command, }); } diff --git a/azalea-client/src/plugins/disconnect.rs b/azalea-client/src/plugins/disconnect.rs index 08fe3807..95d1b5ac 100644 --- a/azalea-client/src/plugins/disconnect.rs +++ b/azalea-client/src/plugins/disconnect.rs @@ -94,7 +94,7 @@ pub fn remove_components_from_disconnected_players( if let Some(reason) = reason { format!(": {reason}") } else { - "".to_string() + "".to_owned() } ); commands diff --git a/azalea-client/src/plugins/task_pool.rs b/azalea-client/src/plugins/task_pool.rs index 5e9031d7..3ee7bf03 100644 --- a/azalea-client/src/plugins/task_pool.rs +++ b/azalea-client/src/plugins/task_pool.rs @@ -105,7 +105,7 @@ impl TaskPoolOptions { IoTaskPool::get_or_init(|| { TaskPoolBuilder::default() .num_threads(io_threads) - .thread_name("IO Task Pool".to_string()) + .thread_name("IO Task Pool".to_owned()) .build() }); } @@ -121,7 +121,7 @@ impl TaskPoolOptions { AsyncComputeTaskPool::get_or_init(|| { TaskPoolBuilder::default() .num_threads(async_compute_threads) - .thread_name("Async Compute Task Pool".to_string()) + .thread_name("Async Compute Task Pool".to_owned()) .build() }); } @@ -136,7 +136,7 @@ impl TaskPoolOptions { ComputeTaskPool::get_or_init(|| { TaskPoolBuilder::default() .num_threads(compute_threads) - .thread_name("Compute Task Pool".to_string()) + .thread_name("Compute Task Pool".to_owned()) .build() }); } diff --git a/azalea-client/src/test_utils/simulation.rs b/azalea-client/src/test_utils/simulation.rs index 1946fd6d..5a1c9c52 100644 --- a/azalea-client/src/test_utils/simulation.rs +++ b/azalea-client/src/test_utils/simulation.rs @@ -71,10 +71,7 @@ impl Simulation { // start in the config state app.world_mut().entity_mut(entity).insert(( InConfigState, - GameProfileComponent(GameProfile::new( - Uuid::from_u128(1234), - "azalea".to_string(), - )), + GameProfileComponent(GameProfile::new(Uuid::from_u128(1234), "azalea".to_owned())), )); tick_app(&mut app); |
