diff --git a/src/block.rs b/src/block.rs index dd3480c0..4a2c5196 100644 --- a/src/block.rs +++ b/src/block.rs @@ -486,7 +486,7 @@ where // Our regular implementation of `yield` breaks yielding methods being // converted to Enumerators because of the protect call not being compatible -// with the fibers used in Ruby itself to impliment `Enumerator#next`. +// with the fibers used in Ruby itself to implement `Enumerator#next`. // We have to use protect in `yield` because otherwise Ruby code can // `break`/`return` through Rust code and break Rust invariants. // This gives up using `protect` by instead using `ensure`, not exposing the diff --git a/src/into_value.rs b/src/into_value.rs index eccbf916..3c43f75f 100644 --- a/src/into_value.rs +++ b/src/into_value.rs @@ -45,7 +45,7 @@ pub trait IntoValue: Sized { /// /// # Safety /// -/// This trait must not be implimented for types that contain `Value`. +/// This trait must not be implemented for types that contain `Value`. pub unsafe trait IntoValueFromNative: IntoValue {} /// Trait for types that can be used as an arguments list when calling Ruby diff --git a/src/numeric.rs b/src/numeric.rs index 22e635ef..eb2b90a5 100644 --- a/src/numeric.rs +++ b/src/numeric.rs @@ -18,7 +18,7 @@ use crate::{ pub trait Numeric: Deref + ReprValue + Copy { /// Apply the operator `op` with coercion. /// - /// As Ruby's operators are implimented as methods, this function can be + /// As Ruby's operators are implemented as methods, this function can be /// thought of as a specialised version of [`Value::funcall`], just for /// subclasses of `Numeric`, and that follows Ruby's coercion protocol. /// @@ -74,7 +74,7 @@ pub trait Numeric: Deref + ReprValue + Copy { /// Apply the operator `op` with coercion. /// - /// As Ruby's operators are implimented as methods, this function can be + /// As Ruby's operators are implemented as methods, this function can be /// thought of as a specialised version of [`Value::funcall`], just for /// subclasses of `Numeric`, and that follows Ruby's coercion protocol. /// @@ -119,7 +119,7 @@ pub trait Numeric: Deref + ReprValue + Copy { /// Apply the operator `op` with coercion. /// - /// As Ruby's operators are implimented as methods, this function can be + /// As Ruby's operators are implemented as methods, this function can be /// thought of as a specialised version of [`Value::funcall`], just for /// subclasses of `Numeric`, and that follows Ruby's coercion protocol. /// @@ -161,7 +161,7 @@ pub trait Numeric: Deref + ReprValue + Copy { /// Apply the operator `op` with coercion. /// - /// As Ruby's operators are implimented as methods, this function can be + /// As Ruby's operators are implemented as methods, this function can be /// thought of as a specialised version of [`Value::funcall`], just for /// subclasses of `Numeric`, and that follows Ruby's coercion protocol. /// diff --git a/src/scan_args.rs b/src/scan_args.rs index e4afd566..c3248c99 100644 --- a/src/scan_args.rs +++ b/src/scan_args.rs @@ -1034,7 +1034,7 @@ mod private { /// This trait is implemented for `(T0,)`, `(T0, T1)`, `(T0, T1, T2)`, etc, /// through to a length of 9, where `T0`, `T1`, etc implement [`TryConvert`]. /// -/// `()` also impliments this trait as a placeholder indicating no required +/// `()` also implements this trait as a placeholder indicating no required /// arguments are required. pub trait ScanArgsRequired: private::ScanArgsRequired {} impl ScanArgsRequired for T where T: private::ScanArgsRequired {} @@ -1046,7 +1046,7 @@ impl ScanArgsRequired for T where T: private::ScanArgsRequired {} /// etc, through to a length of 9, where `T0`, `T1`, etc implement /// [`TryConvert`]. /// -/// `()` also impliments this trait as a placeholder indicating no optional +/// `()` also implements this trait as a placeholder indicating no optional /// arguments are required. pub trait ScanArgsOpt: private::ScanArgsOpt {} impl ScanArgsOpt for T where T: private::ScanArgsOpt {} @@ -1058,7 +1058,7 @@ impl ScanArgsOpt for T where T: private::ScanArgsOpt {} /// and converts to an owned Rust value (not a handle to a Ruby object). It is /// also implemented for [`RArray`]. /// -/// `()` also impliments this trait as a placeholder indicating no splat +/// `()` also implements this trait as a placeholder indicating no splat /// argument is required. pub trait ScanArgsSplat: private::ScanArgsSplat {} impl ScanArgsSplat for T where T: private::ScanArgsSplat {} @@ -1068,7 +1068,7 @@ impl ScanArgsSplat for T where T: private::ScanArgsSplat {} /// /// This trait is implemented for [`RHash`]. /// -/// `()` also impliments this trait as a placeholder indicating no keyword +/// `()` also implements this trait as a placeholder indicating no keyword /// arguments are required. pub trait ScanArgsKw: private::ScanArgsKw {} impl ScanArgsKw for T where T: private::ScanArgsKw {} @@ -1078,7 +1078,7 @@ impl ScanArgsKw for T where T: private::ScanArgsKw {} /// /// This trait is implemented for [`Proc`] and `Option`. /// -/// `()` also impliments this trait as a placeholder for when no block argument +/// `()` also implements this trait as a placeholder for when no block argument /// is required, although Ruby will still allow a block to be passed, it will /// just ignore it (as is standard for all Ruby methods). pub trait ScanArgsBlock: private::ScanArgsBlock {} diff --git a/src/typed_data.rs b/src/typed_data.rs index c36821e9..44e8c2e6 100644 --- a/src/typed_data.rs +++ b/src/typed_data.rs @@ -293,9 +293,9 @@ where /// /// # Safety /// -/// This trait is unsafe to impliment as the fields of [`DataType`] returned by +/// This trait is unsafe to implement as the fields of [`DataType`] returned by /// [`TypedData::data_type`] control low level behaviour that can go very wrong -/// if set incorrectly. Implimenting this trait is the only way a [`DataType`] +/// if set incorrectly. Implementing this trait is the only way a [`DataType`] /// can be passed to Ruby and result in safety violations, [`DataType`] is /// otherwise safe (but useless) to create. /// diff --git a/src/value.rs b/src/value.rs index 02555f73..e5b2e68c 100644 --- a/src/value.rs +++ b/src/value.rs @@ -1720,7 +1720,7 @@ impl Qundef { /// It is not a good idea to return this to Ruby code, bad things will /// happen. There are only a handful of places in Ruby's API where it is /// appropriate to pass a [`Value`] created from `Qundef` (hence this - /// method, rather than implimenting [`IntoValue`]). + /// method, rather than implementing [`IntoValue`]). #[inline] pub unsafe fn to_value(self) -> Value { self.0.get()