Skip to content

Commit 8f1cfec

Browse files
Merge pull request #150 from striezel-stash/fix-typos
Fix a few typos
2 parents 72f39df + 4bb0559 commit 8f1cfec

File tree

18 files changed

+28
-26
lines changed

18 files changed

+28
-26
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Thanks to the contributors for this release:
170170
successfully with overwrite.
171171
- `push()` now returns a `Result`.
172172
- Converting from a `Vec` or `HashMap` to a `ZendHashTable` is fallible, so
173-
it now implementes `TryFrom` as opposed to `From`.
173+
it now implements `TryFrom` as opposed to `From`.
174174
- For `Zval`:
175175
- `set_string()` now returns a `Result`, and takes a second parameter
176176
(persistent).

allowed_bindings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This is a cheeky hack - since we need the list of allowed bindings in both
2-
// the build script and in the CLI crate (in differnet formats), we define the
2+
// the build script and in the CLI crate (in different formats), we define the
33
// `allowed_bindings.rs` file, which calls a macro called `bind` that doesn't
44
// exist in the bindings file. Which ever script include!s the bindings must
55
// define the `bind` macro. This allows us to have the list in string format

crates/macros/src/module.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ impl Describe for Function {
170170
let name = &self.name;
171171
let ret = if let Some((ty, null)) = &self.output {
172172
let ty: Type = syn::parse_str(ty)
173-
.expect("unreachable - failed to parse previosuly parsed function return type");
173+
.expect("unreachable - failed to parse previously parsed function return type");
174174
quote! {
175175
Some(Retval {
176176
ty: <#ty as ::ext_php_rs::convert::IntoZval>::TYPE,
@@ -300,7 +300,7 @@ impl Describe for crate::method::Method {
300300
}
301301
});
302302
let ret = if let Some((ty, null)) = &self.output {
303-
let ty: Type = syn::parse_str(ty).expect("failed to parse previosuly parsed type");
303+
let ty: Type = syn::parse_str(ty).expect("failed to parse previously parsed type");
304304
quote! {
305305
Some(Retval {
306306
ty: <#ty as ::ext_php_rs::convert::IntoZval>::TYPE,

guide/src/types/closure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ext-php-rs = { version = "...", features = ["closure"] }
1414

1515
PHP callables (which includes closures) can be passed to Rust through the
1616
`Callable` type. When calling a callable, you must provide it with a `Vec` of
17-
arguemnts, all of which must implement `IntoZval` and `Clone`.
17+
arguments, all of which must implement `IntoZval` and `Clone`.
1818

1919
| `T` parameter | `&T` parameter | `T` Return type | `&T` Return type | PHP representation |
2020
| ------------- | -------------- | -------------------------------------- | ---------------- | ------------------------------------------------------------------------------------------ |

src/boxed.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl<T: ZBoxable> ZBox<T> {
6262
pub fn into_raw(self) -> &'static mut T {
6363
let mut this = ManuallyDrop::new(self);
6464
// SAFETY: All constructors ensure the contained pointer is well-aligned and
65-
// dereferencable.
65+
// dereferenceable.
6666
unsafe { this.0.as_mut() }
6767
}
6868
}
@@ -80,7 +80,7 @@ impl<T: ZBoxable> Deref for ZBox<T> {
8080
#[inline]
8181
fn deref(&self) -> &Self::Target {
8282
// SAFETY: All constructors ensure the contained pointer is well-aligned and
83-
// dereferencable.
83+
// dereferenceable.
8484
unsafe { self.0.as_ref() }
8585
}
8686
}
@@ -89,7 +89,7 @@ impl<T: ZBoxable> DerefMut for ZBox<T> {
8989
#[inline]
9090
fn deref_mut(&mut self) -> &mut Self::Target {
9191
// SAFETY: All constructors ensure the contained pointer is well-aligned and
92-
// dereferencable.
92+
// dereferenceable.
9393
unsafe { self.0.as_mut() }
9494
}
9595
}

src/builders/class.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl ClassBuilder {
3838
pub fn new<T: Into<String>>(name: T) -> Self {
3939
Self {
4040
name: name.into(),
41-
// SAFETY: A zeroed class entry is in an initalized state, as it is a raw C type
41+
// SAFETY: A zeroed class entry is in an initialized state, as it is a raw C type
4242
// whose fields do not have a drop implementation.
4343
ce: unsafe { MaybeUninit::zeroed().assume_init() },
4444
extends: None,

src/builders/function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl<'a> FunctionBuilder<'a> {
9696
/// # Parameters
9797
///
9898
/// * `type_` - The return type of the function.
99-
/// * `as_ref` - Whether the fucntion returns a reference.
99+
/// * `as_ref` - Whether the function returns a reference.
100100
/// * `allow_null` - Whether the function return value is nullable.
101101
pub fn returns(mut self, type_: DataType, as_ref: bool, allow_null: bool) -> Self {
102102
self.retval = Some(type_);

src/class.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub struct ConstructorMeta<T> {
5959
pub enum ConstructorResult<T> {
6060
/// Successfully constructed the class, contains the new class object.
6161
Ok(T),
62-
/// An exception occured while constructing the class.
62+
/// An exception occurred while constructing the class.
6363
Exception(PhpException),
6464
/// Invalid arguments were given to the constructor.
6565
ArgError,

src/convert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ where
7575
/// let props: HashMap = obj.extract();
7676
/// ```
7777
///
78-
/// Should be functionally equivalent to casting an object to another compatable
78+
/// Should be functionally equivalent to casting an object to another compatible
7979
/// type.
8080
pub trait FromZendObject<'a>: Sized {
8181
/// Extracts `Self` from the source `ZendObject`.

src/describe/stub.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ fn split_namespace(class: &str) -> (StdOption<&str>, &str) {
340340
/// to be appended. Returns a new string with the new indentation. Will not
341341
/// indent whitespace lines.
342342
///
343-
/// # Paramters
343+
/// # Parameters
344344
///
345345
/// * `s` - The string to indent.
346346
/// * `depth` - The depth to indent the lines to, in spaces.

0 commit comments

Comments
 (0)