Skip to content

Commit c27d1c1

Browse files
Fix typos. (#942)
1 parent 227b770 commit c27d1c1

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/command_helpers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl StderrForwarder {
122122

123123
// SAFETY: 1) the length is set to the capacity, so we are never using memory beyond
124124
// the underlying buffer and 2) we always call `truncate` below to set the len back
125-
// to the intitialized data.
125+
// to the initialized data.
126126
unsafe {
127127
buffer.set_len(buffer.capacity());
128128
}

src/lib.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ impl Build {
10161016

10171017
/// Run the compiler, generating the file `output`
10181018
///
1019-
/// This will return a result instead of panicing; see compile() for the complete description.
1019+
/// This will return a result instead of panicking; see compile() for the complete description.
10201020
pub fn try_compile(&self, output: &str) -> Result<(), Error> {
10211021
let mut output_components = Path::new(output).components();
10221022
match (output_components.next(), output_components.next()) {
@@ -1201,7 +1201,7 @@ impl Build {
12011201
/// Run the compiler, generating intermediate files, but without linking
12021202
/// them into an archive file.
12031203
///
1204-
/// This will return a result instead of panicing; see `compile_intermediates()` for the complete description.
1204+
/// This will return a result instead of panicking; see `compile_intermediates()` for the complete description.
12051205
pub fn try_compile_intermediates(&self) -> Result<Vec<PathBuf>, Error> {
12061206
let dst = self.get_out_dir()?;
12071207
let objects = objects_from_files(&self.files, &dst)?;
@@ -1436,7 +1436,7 @@ impl Build {
14361436
Ok((cmd, name))
14371437
}
14381438

1439-
/// This will return a result instead of panicing; see expand() for the complete description.
1439+
/// This will return a result instead of panicking; see expand() for the complete description.
14401440
pub fn try_expand(&self) -> Result<Vec<u8>, Error> {
14411441
let compiler = self.try_get_compiler()?;
14421442
let mut cmd = compiler.to_command();
@@ -1523,7 +1523,7 @@ impl Build {
15231523

15241524
/// Get the compiler that's in use for this configuration.
15251525
///
1526-
/// This will return a result instead of panicing; see
1526+
/// This will return a result instead of panicking; see
15271527
/// [`get_compiler()`](Self::get_compiler) for the complete description.
15281528
pub fn try_get_compiler(&self) -> Result<Tool, Error> {
15291529
let opt_level = self.get_opt_level()?;
@@ -2778,7 +2778,7 @@ impl Build {
27782778

27792779
/// Get the archiver that's in use for this configuration.
27802780
///
2781-
/// This will return a result instead of panicing;
2781+
/// This will return a result instead of panicking;
27822782
/// see [`Self::get_archiver`] for the complete description.
27832783
pub fn try_get_archiver(&self) -> Result<Command, Error> {
27842784
Ok(self.try_get_archiver_and_flags()?.0)
@@ -2829,7 +2829,7 @@ impl Build {
28292829

28302830
/// Get the ranlib that's in use for this configuration.
28312831
///
2832-
/// This will return a result instead of panicing;
2832+
/// This will return a result instead of panicking;
28332833
/// see [`Self::get_ranlib`] for the complete description.
28342834
pub fn try_get_ranlib(&self) -> Result<Command, Error> {
28352835
let mut cmd = self.get_base_ranlib()?;
@@ -2873,7 +2873,7 @@ impl Build {
28732873
// Formally speaking one should be able to use this approach,
28742874
// parsing -print-search-dirs output, to cover all clang targets,
28752875
// including Android SDKs and other cross-compilation scenarios...
2876-
// And even extend it to gcc targets by seaching for "ar" instead
2876+
// And even extend it to gcc targets by searching for "ar" instead
28772877
// of "llvm-ar"...
28782878
let compiler = self.get_base_compiler().ok()?;
28792879
if compiler.family == ToolFamily::Clang {
@@ -2944,7 +2944,7 @@ impl Build {
29442944
Some(p) => {
29452945
// GCC uses $target-gcc-ar, whereas binutils uses $target-ar -- try both.
29462946
// Prefer -ar if it exists, as builds of `-gcc-ar` have been observed to be
2947-
// outright broken (such as when targetting freebsd with `--disable-lto`
2947+
// outright broken (such as when targeting freebsd with `--disable-lto`
29482948
// toolchain where the archiver attempts to load the LTO plugin anyway but
29492949
// fails to find one).
29502950
//

src/parallel/async_executor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ where
6363
let mut fut2 = Some(unsafe { Pin::new_unchecked(&mut fut2) });
6464

6565
// TODO: Once `Waker::noop` stablised and our MSRV is bumped to the version
66-
// which it is stablised, replace this wth `Waker::noop`.
66+
// which it is stablised, replace this with `Waker::noop`.
6767
let waker = unsafe { Waker::from_raw(NOOP_RAW_WAKER) };
6868
let mut context = Context::from_waker(&waker);
6969

tests/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ fn gnu_apple_darwin() {
498498
test.gcc()
499499
.target(&target)
500500
.host(&target)
501-
// Avoid test maintainence when minimum supported OSes change.
501+
// Avoid test maintenance when minimum supported OSes change.
502502
.__set_env("MACOSX_DEPLOYMENT_TARGET", version)
503503
.file("foo.c")
504504
.compile("foo");

0 commit comments

Comments
 (0)