Skip to content

Commit

Permalink
typos in comments (#8495)
Browse files Browse the repository at this point in the history
* typos in comments

* typos in comments and one fuzzing error message

* revert typo under the deps directory
  • Loading branch information
FrankReh committed Apr 29, 2024
1 parent 1cf3a9d commit 1f39f63
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions crates/cli-flags/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ wasmtime_option_group! {
pub cli: Option<bool>,
/// Deprecated alias for `cli`
pub common: Option<bool>,
/// Enable suport for WASI neural network API (experimental)
/// Enable support for WASI neural network API (experimental)
pub nn: Option<bool>,
/// Enable suport for WASI threading API (experimental)
/// Enable support for WASI threading API (experimental)
pub threads: Option<bool>,
/// Enable suport for WASI HTTP API (experimental)
/// Enable support for WASI HTTP API (experimental)
pub http: Option<bool>,
/// Inherit environment variables and file descriptors following the
/// systemd listen fd specification (UNIX only)
Expand Down
10 changes: 5 additions & 5 deletions crates/fuzzing/src/generators/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ impl DiffValue {
];
let bits = biased_arbitrary_value(u, known_f32_values)?;

// If the chosen bits are NAN then always use the canonical bit
// pattern of nan to enable better compatibility with engines
// where arbitrary nan patterns can't make their way into wasm
// If the chosen bits are NaN then always use the canonical bit
// pattern of NaN to enable better compatibility with engines
// where arbitrary NaN patterns can't make their way into wasm
// (e.g. v8 through JS can't do that).
let bits = if f32::from_bits(bits).is_nan() {
f32::NAN.to_bits()
Expand All @@ -85,7 +85,7 @@ impl DiffValue {
f64::MAX.to_bits(),
];
let bits = biased_arbitrary_value(u, known_f64_values)?;
// See `f32` above for why canonical nan patterns are always
// See `f32` above for why canonical NaN patterns are always
// used.
let bits = if f64::from_bits(bits).is_nan() {
f64::NAN.to_bits()
Expand Down Expand Up @@ -302,7 +302,7 @@ impl TryFrom<wasmtime::ValType> for DiffValueType {
(true, HeapType::Any) => Ok(Self::AnyRef),
(true, HeapType::I31) => Ok(Self::AnyRef),
(true, HeapType::None) => Ok(Self::AnyRef),
_ => Err("non-funcref and non-externref reference types are not suported yet"),
_ => Err("non-funcref and non-externref reference types are not supported yet"),
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/runtime/src/component/resources.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Implementation of the canonical-ABI related intrinsics for resources in the
//! component model.
//!
//! This module contains all the relevant gory details of the details of the
//! This module contains all the relevant gory details of the
//! component model related to lifting and lowering resources. For example
//! intrinsics like `resource.new` will bottom out in calling this file, and
//! this is where resource tables are actually defined and modified.
Expand Down
2 changes: 1 addition & 1 deletion crates/runtime/src/cow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ impl MemoryImageSlot {
/// Create a new MemoryImageSlot. Assumes that there is an anonymous
/// mmap backing in the given range to start.
///
/// The `accessible` parameter descibes how much of linear memory is
/// The `accessible` parameter describes how much of linear memory is
/// already mapped as R/W with all zero-bytes. The `static_size` value is
/// the maximum size of this image which `accessible` cannot grow beyond,
/// and all memory from `accessible` from `static_size` should be mapped as
Expand Down
6 changes: 3 additions & 3 deletions crates/runtime/src/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ pub struct ExportFunction {
pub func_ref: NonNull<VMFuncRef>,
}

// It's part of the contract of using `ExportFunction` that synchronization
// properties are upheld, so declare that despite the raw pointers inside this
// is send/sync.
// As part of the contract for using `ExportFunction`, synchronization
// properties must be upheld. Therefore, despite containing raw pointers,
// it is declared as Send/Sync.
unsafe impl Send for ExportFunction {}
unsafe impl Sync for ExportFunction {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3357,7 +3357,7 @@ pub mod wasi {
/// This function does not return a `result`; polling in itself does not
/// do any I/O so it doesn't fail. If any of the I/O sources identified by
/// the pollables has an error, it is indicated by marking the source as
/// being reaedy for I/O.
/// being ready for I/O.
pub fn poll(in_: &[&Pollable],) -> wit_bindgen::rt::vec::Vec::<u32>{

#[allow(unused_imports)]
Expand Down Expand Up @@ -9168,4 +9168,4 @@ pub mod wasi {
#[doc(hidden)]
#[cfg(target_arch = "wasm32")]
pub fn __link_section() {}


4 changes: 2 additions & 2 deletions crates/wasmtime/src/runtime/component/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,15 +425,15 @@ impl ResultType {
ResultType(Handle::new(index, ty))
}

/// Retrieve the `ok` type parameter for this `option`.
/// Retrieve the `ok` type parameter for this `result`.
pub fn ok(&self) -> Option<Type> {
Some(Type::from(
self.0.types[self.0.index].ok.as_ref()?,
&self.0.instance(),
))
}

/// Retrieve the `err` type parameter for this `option`.
/// Retrieve the `err` type parameter for this `result`.
pub fn err(&self) -> Option<Type> {
Some(Type::from(
self.0.types[self.0.index].err.as_ref()?,
Expand Down

0 comments on commit 1f39f63

Please sign in to comment.