Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kianmeng authored and sylvestre committed Jun 25, 2022
1 parent 02bcd40 commit 3677eb1
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ configuration variables
* `SCCACHE_CACHED_CONF`
* `SCCACHE_IDLE_TIMEOUT` how long the local daemon process waits for more client requests before exiting
* `SCCACHE_STARTUP_NOTIFY` specify a path to a socket which will be used for server completion notification
* `SCCACHE_MAX_FRAME_LENGTH` how much data can be transfered between client and server
* `SCCACHE_MAX_FRAME_LENGTH` how much data can be transferred between client and server
* `SCCACHE_NO_DAEMON` set to `1` to disable putting the server to the background

### cache configs
Expand Down
2 changes: 1 addition & 1 deletion src/bin/sccache-dist/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl OverlayBuilder {
let source: Option<&str> = None;
let fstype: Option<&str> = None;
let data: Option<&str> = None;
// Turn / into a 'slave', so it receives mounts from real root, but doesn't propogate back
// Turn / into a 'slave', so it receives mounts from real root, but doesn't propagate back
nix::mount::mount(
source,
"/",
Expand Down
4 changes: 2 additions & 2 deletions src/bin/sccache-dist/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ fn init_logging() {
if env::var(sccache::LOGGING_ENV).is_ok() {
match env_logger::Builder::from_env(sccache::LOGGING_ENV).try_init() {
Ok(_) => (),
Err(e) => panic!("Failed to initalize logging: {:?}", e),
Err(e) => panic!("Failed to initialize logging: {:?}", e),
}
}
}
Expand Down Expand Up @@ -795,7 +795,7 @@ impl SchedulerIncoming for Scheduler {
let job_detail = entry.get();
if job_detail.server_id != server_id {
bail!(
"Job id {} is not registed on server {:?}",
"Job id {} is not registered on server {:?}",
job_id,
server_id
)
Expand Down
2 changes: 1 addition & 1 deletion src/cache/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl Storage for RedisCache {
format!("Redis: {}", self.display_url)
}

/// Returns the current cache size. This value is aquired via
/// Returns the current cache size. This value is acquired via
/// the Redis INFO command (used_memory).
async fn current_size(&self) -> Result<Option<u64>> {
let mut c = self.connect().await?;
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub enum NormalizedDisposition {

impl<T: ArgumentValue> Argument<T> {
/// For arguments that allow both a concatenated or separated disposition,
/// normalize a parsed argument to a prefered disposition.
/// normalize a parsed argument to a preferred disposition.
pub fn normalize(self, disposition: NormalizedDisposition) -> Self {
match self {
Argument::WithValue(s, v, ArgDisposition::CanBeConcatenated(d))
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/diab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ impl<'a> Iterator for ExpandAtArgs<'a> {
let file = self.cwd.join(&value);
let res = File::open(&file).and_then(|mut f| f.read_to_string(&mut contents));
if res.is_err() {
// Failed to read the file, so return the argumet as it is.
// Failed to read the file, so return the argument as it is.
// This will result in a CannotCache.
return Some(arg);
}
Expand Down
6 changes: 3 additions & 3 deletions src/compiler/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub struct RustupProxy {

#[derive(Debug, Clone, PartialEq)]
pub struct ParsedArguments {
/// The full commandline, with all parsed aguments
/// The full commandline, with all parsed arguments
arguments: Vec<Argument<ArgData>>,
/// The location of compiler outputs.
output_dir: PathBuf,
Expand Down Expand Up @@ -625,7 +625,7 @@ impl RustupProxy {
Ok(ProxyPath::Candidate(_)) => unreachable!("Q.E.D."),
Ok(ProxyPath::ToBeDiscovered) => {
// simple check: is there a rustup in the same parent dir as rustc?
// that would be the prefered one
// that would be the preferred one
Ok(match compiler_executable.parent().map(Path::to_owned) {
Some(parent) => {
let proxy_candidate = parent.join(proxy_name);
Expand Down Expand Up @@ -2204,7 +2204,7 @@ impl RlibDepReader {
}

// The goal of this cache is to avoid repeated lookups when building a single project. Let's budget 3MB.
// Allowing for a 100 byte path, 50 dependecies per rlib and 20 characters per crate name, this roughly
// Allowing for a 100 byte path, 50 dependencies per rlib and 20 characters per crate name, this roughly
// approximates to `path_size + path + vec_size + num_deps * (systemtime_size + string_size + crate_name_len)`
// ` 3*8 + 100 + 3*8 + 50 * ( 8 + 3*8 + 20 )`
// `2748` bytes per crate
Expand Down
6 changes: 3 additions & 3 deletions src/dist/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ mod client {
// not strictly wrong, but it is a bit odd
if old_path != custom_tc.archive {
warn!(
"Detected interchangable toolchain archives at {} and {}",
"Detected interchangeable toolchain archives at {} and {}",
old_path.display(),
custom_tc.archive.display()
)
Expand Down Expand Up @@ -347,13 +347,13 @@ mod client {
archive: ct1.clone(),
archive_compiler_executable: "/my/compiler/in_archive".into(),
},
// Uses the same archive, but a maps a different external compiler to a different achive compiler
// Uses the same archive, but a maps a different external compiler to a different archive compiler
config::DistToolchainConfig::PathOverride {
compiler_executable: "/my/compiler2".into(),
archive: ct1.clone(),
archive_compiler_executable: "/my/compiler2/in_archive".into(),
},
// Uses the same archive, but a maps a different external compiler to the same achive compiler as the first
// Uses the same archive, but a maps a different external compiler to the same archive compiler as the first
config::DistToolchainConfig::PathOverride {
compiler_executable: "/my/compiler3".into(),
archive: ct1.clone(),
Expand Down
2 changes: 1 addition & 1 deletion src/dist/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ mod server {
.context("failed to build EKU extension for x509")?;
builder
.append_extension(ext_key_usage)
.context("failes to append EKU extension for x509")?;
.context("fails to append EKU extension for x509")?;

// Finish the certificate
builder
Expand Down
2 changes: 1 addition & 1 deletion src/dist/pkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ mod toolchain_imp {
// /lib64/ld-linux-x86-64.so.2 (0x00007f6878171000)
// libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f68774f4000)
//
// Elf executables can be statically or dynamically linked, and position independant (PIE) or not:
// Elf executables can be statically or dynamically linked, and position independent (PIE) or not:
// - dynamic + PIE = ET_DYN, ldd stdouts something like the list above and exits with code 0
// - dynamic + non-PIE = ET_EXEC, ldd stdouts something like the list above and exits with code 0
// - static + PIE = ET_DYN, ldd stdouts something like "\tstatically linked" or
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fn init_logging() {
if env::var(LOGGING_ENV).is_ok() {
match env_logger::Builder::from_env(LOGGING_ENV).try_init() {
Ok(_) => (),
Err(e) => panic!("Failed to initalize logging: {:?}", e),
Err(e) => panic!("Failed to initialize logging: {:?}", e),
}
}
}
4 changes: 2 additions & 2 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ impl<C: CommandCreatorSync> SccacheServer<C> {
// 2. An RPC indicating the server should shut down
// 3. A period of inactivity (no requests serviced)
//
// These are all encapsulated wih the future that we're creating below.
// These are all encapsulated with the future that we're creating below.
// The `ShutdownOrInactive` indicates the RPC or the period of
// inactivity, and this is then select'd with the `shutdown` future
// passed to this function.
Expand Down Expand Up @@ -863,7 +863,7 @@ where
/// Handle a compile request from a client.
///
/// This will handle a compile request entirely, generating a response with
/// the inital information and an optional body which will eventually
/// the initial information and an optional body which will eventually
/// contain the results of the compilation.
async fn handle_compile(&self, compile: Compile) -> Result<SccacheResponse> {
let exe = compile.exe;
Expand Down
2 changes: 1 addition & 1 deletion tests/harness/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ impl DistSystem {
}
}

// If you want containers to hang around (e.g. for debugging), commend out the "rm -f" lines
// If you want containers to hang around (e.g. for debugging), comment out the "rm -f" lines
#[cfg(feature = "dist-server")]
impl Drop for DistSystem {
fn drop(&mut self) {
Expand Down

0 comments on commit 3677eb1

Please sign in to comment.