Skip to content

Commit b1f6004

Browse files
refactor: add non_ascii_literal clippy correctness lint (#932)
1 parent 8fe2884 commit b1f6004

File tree

8 files changed

+11
-10
lines changed

8 files changed

+11
-10
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ large_stack_frames = "warn"
106106
mem_forget = "warn"
107107
mixed_read_write_in_expression = "warn"
108108
needless_raw_strings = "warn"
109+
non_ascii_literal = "warn"
109110

110111
# == Style, readability == #
111112
semicolon_outside_block = "warn" # With semicolon-outside-block-ignore-multiline = true

crates/ironrdp-client/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ fn setup_logging(log_file: Option<&str>) -> anyhow::Result<()> {
9494
.create(true)
9595
.append(true)
9696
.open(log_file)
97-
.with_context(|| format!("couldnt open {log_file}"))?;
97+
.with_context(|| format!("couldn't open {log_file}"))?;
9898
let fmt_layer = tracing_subscriber::fmt::layer()
9999
.with_ansi(false)
100100
.with_writer(file)

crates/ironrdp-client/src/rdp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ where
394394
framed
395395
.write_all(&rdcleanpath_req)
396396
.await
397-
.map_err(|e| connector::custom_err!("couldnt write RDCleanPath request", e))?;
397+
.map_err(|e| connector::custom_err!("couldn't write RDCleanPath request", e))?;
398398
}
399399

400400
{

crates/ironrdp-connector/src/connection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ impl Sequence for ClientConnector {
354354
if client_gcc_blocks.security == gcc::ClientSecurityData::no_security()
355355
&& server_gcc_blocks.security != gcc::ServerSecurityData::no_security()
356356
{
357-
return Err(general_err!("cant satisfy server security settings"));
357+
return Err(general_err!("can't satisfy server security settings"));
358358
}
359359

360360
if server_gcc_blocks.message_channel.is_some() {

crates/ironrdp-connector/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ impl Written {
280280
pub fn from_size(value: usize) -> ConnectorResult<Self> {
281281
core::num::NonZeroUsize::new(value)
282282
.map(Self::Size)
283-
.ok_or_else(|| ConnectorError::general("invalid written length (cant be zero)"))
283+
.ok_or_else(|| ConnectorError::general("invalid written length (can't be zero)"))
284284
}
285285

286286
#[inline]

crates/ironrdp-pdu/src/rdp/server_error_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl ProtocolIndependentCode {
149149
Self::ServerDeniedConnection => "The server denied the connection",
150150
Self::ServerInsufficientPrivileges => "The user cannot connect to the server due to insufficient access privileges",
151151
Self::ServerFreshCredentialsRequired => "The server does not accept saved user credentials and requires that the user enter their credentials for each connection",
152-
Self::RpcInitiatedDisconnectByuser => "The disconnection was initiated by an administrative tool on the server running in the users session",
152+
Self::RpcInitiatedDisconnectByuser => "The disconnection was initiated by an administrative tool on the server running in the user's session",
153153
Self::LogoffByUser => "The disconnection was initiated by the user logging off his or her session on the server",
154154
Self::CloseStackOnDriverNotReady => "The display driver in the remote session did not report any status within the time allotted for startup",
155155
Self::ServerDwmCrash => "The DWM process running in the remote session terminated unexpectedly",

xtask/src/clean.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ use crate::prelude::*;
33
pub fn workspace(sh: &Shell) -> anyhow::Result<()> {
44
let _s = Section::new("CLEAN");
55

6-
println!("Remove wasm package folder");
6+
println!("Remove wasm package folder...");
77
sh.remove_path("./crates/ironrdp-web/pkg")?;
88
println!("Done.");
99

10-
println!("Remove npm folders");
10+
println!("Remove npm folders...");
1111
sh.remove_path("./web-client/iron-remote-desktop/node_modules")?;
1212
sh.remove_path("./web-client/iron-remote-desktop/dist")?;
1313
sh.remove_path("./web-client/iron-remote-desktop-rdp/node_modules")?;
1414
sh.remove_path("./web-client/iron-remote-desktop-rdp/dist")?;
1515
sh.remove_path("./web-client/iron-svelte-client/node_modules")?;
1616
println!("Done.");
1717

18-
println!("Remove local cargo root folder");
18+
println!("Remove local cargo root folder...");
1919
sh.remove_path("./.cargo/local_root")?;
2020
println!("Done.");
2121

xtask/src/cov.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub fn report_github(sh: &Shell, repo: &str, pr_id: u32) -> anyhow::Result<()> {
9292
match std::env::var_os("GH_TOKEN") {
9393
Some(value) if value.is_empty() => trace!("WARNING: `GH_TOKEN` environment variable is empty"),
9494
Some(value) if value.is_ascii() => trace!("`GH_TOKEN` environment variable appears to be set properly"),
95-
Some(_) => trace!("WARNING: `GH_TOKEN` environment variables value is not an ASCII string"),
95+
Some(_) => trace!("WARNING: `GH_TOKEN` environment variable's value is not an ASCII string"),
9696
None => trace!("WARNING: `GH_TOKEN` environment variable is not set"),
9797
}
9898

@@ -151,7 +151,7 @@ pub fn report_github(sh: &Shell, repo: &str, pr_id: u32) -> anyhow::Result<()> {
151151
.ignore_stdout()
152152
.run()?;
153153
} else {
154-
println!("Coverage didnt change, skip GitHub comment");
154+
println!("Coverage didn't change, skip GitHub comment");
155155
}
156156

157157
Ok(())

0 commit comments

Comments
 (0)