Skip to content

Commit 55f4717

Browse files
authored
Merge pull request #668 from Lamby777/export-var-typo
fix `#[var]` docs typo
2 parents fbc1426 + ee7b00b commit 55f4717

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

godot-cell/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub struct GdCell<T> {
4848
/// The actual value we're handing out references to, uses `UnsafeCell` as we're passing out `&mut`
4949
/// references to its contents even when we only have a `&` reference to the cell.
5050
value: UnsafeCell<T>,
51-
/// We dont want to be able to take `GdCell` out of a pin, so `GdCell` cannot implement `Unpin`.
51+
/// We don't want to be able to take `GdCell` out of a pin, so `GdCell` cannot implement `Unpin`.
5252
_pin: PhantomPinned,
5353
}
5454

@@ -93,7 +93,7 @@ impl<T> GdCell<T> {
9393
// This is the case because the only way for a new `GdMut` or `GdRef` to be made after this is for
9494
// either this guard to be dropped or `make_inaccessible` to be called and succeed.
9595
//
96-
// If this guard is dropped, then we dont need to worry.
96+
// If this guard is dropped, then we don't need to worry.
9797
//
9898
// If `make_inaccessible` is called and succeeds, then a mutable reference from this guard is passed
9999
// in. In which case, we cannot use this guard again until the resulting inaccessible guard is

godot-codegen/src/generator/classes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ fn make_constructor_and_default(class: &Class, ctx: &Context) -> (TokenStream, T
347347
}
348348

349349
fn make_deref_impl(class_name: &TyName, base_ty: &TokenStream) -> TokenStream {
350-
// The base_ty of `Object` is `NoBase`, and we dont want every engine class to deref to `NoBase`.
350+
// The base_ty of `Object` is `NoBase`, and we don't want every engine class to deref to `NoBase`.
351351
if class_name.rust_ty == "Object" {
352352
return TokenStream::new();
353353
}

godot-core/src/builtin/array.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl<T: GodotType> Array<T> {
134134

135135
/// Reverses the order of the elements in the array.
136136
pub fn reverse(&mut self) {
137-
// SAFETY: We do not write any values that dont already exist in the array, so all values have the correct type.
137+
// SAFETY: We do not write any values that don't already exist in the array, so all values have the correct type.
138138
unsafe { self.as_inner_mut() }.reverse();
139139
}
140140

@@ -145,7 +145,7 @@ impl<T: GodotType> Array<T> {
145145
/// considered equal may have their order changed when using `sort_unstable`.
146146
#[doc(alias = "sort")]
147147
pub fn sort_unstable(&mut self) {
148-
// SAFETY: We do not write any values that dont already exist in the array, so all values have the correct type.
148+
// SAFETY: We do not write any values that don't already exist in the array, so all values have the correct type.
149149
unsafe { self.as_inner_mut() }.sort();
150150
}
151151

@@ -158,15 +158,15 @@ impl<T: GodotType> Array<T> {
158158
/// `sort_unstable`.
159159
#[doc(alias = "sort_custom")]
160160
pub fn sort_unstable_custom(&mut self, func: Callable) {
161-
// SAFETY: We do not write any values that dont already exist in the array, so all values have the correct type.
161+
// SAFETY: We do not write any values that don't already exist in the array, so all values have the correct type.
162162
unsafe { self.as_inner_mut() }.sort_custom(func);
163163
}
164164

165165
/// Shuffles the array such that the items will have a random order. This method uses the
166166
/// global random number generator common to methods such as `randi`. Call `randomize` to
167167
/// ensure that a new seed will be used each time if you want non-reproducible shuffling.
168168
pub fn shuffle(&mut self) {
169-
// SAFETY: We do not write any values that dont already exist in the array, so all values have the correct type.
169+
// SAFETY: We do not write any values that don't already exist in the array, so all values have the correct type.
170170
unsafe { self.as_inner_mut() }.shuffle();
171171
}
172172

@@ -1008,7 +1008,7 @@ impl<T: GodotType + FromGodot> From<&Array<T>> for Vec<T> {
10081008
let mut vec = Vec::with_capacity(len);
10091009

10101010
// SAFETY: Unless `experimental-threads` is enabled, then we cannot have concurrent access to this array.
1011-
// And since we dont concurrently access the array in this function, we can create a slice to its contents.
1011+
// And since we don't concurrently access the array in this function, we can create a slice to its contents.
10121012
let elements = unsafe { Variant::borrow_slice(array.ptr(0), len) };
10131013

10141014
vec.extend(elements.iter().map(T::from_variant));

godot-ffi/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub use string_cache::StringCache;
7575
pub use toolbox::*;
7676

7777
// SAFETY: In Godot 4.0.4 the extension interface stores a c_char pointer, this is safe to access from different threads as no
78-
// mutation happens after initialization. This was changed in 4.1, so we dont need to manually implement `Sync` or `Send` after 4.0.
78+
// mutation happens after initialization. This was changed in 4.1, so we don't need to manually implement `Sync` or `Send` after 4.0.
7979
// So we instead rely on rust to infer that it is `Sync` and `Send`.
8080
#[cfg(before_api = "4.1")]
8181
unsafe impl Sync for GDExtensionInterface {}

godot-macros/src/class/data_models/func.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub struct FuncDefinition {
2424

2525
/// Returns a C function which acts as the callback when a virtual method of this instance is invoked.
2626
//
27-
// There are currently no virtual static methods. Additionally, virtual static methods dont really make a lot
27+
// There are currently no virtual static methods. Additionally, virtual static methods don't really make a lot
2828
// of sense. Therefore there is no need to support them.
2929
pub fn make_virtual_callback(
3030
class_name: &Ident,

godot-macros/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ use crate::util::ident;
105105
/// # Inheritance
106106
///
107107
/// Unlike C++, Rust doesn't really have inheritance, but the GDExtension API lets us "inherit"
108-
/// from a built-in engine class.
108+
/// from a Godot-provided engine class.
109109
///
110-
/// By default, classes created with this library inherit from `RefCounted`.
110+
/// By default, classes created with this library inherit from `RefCounted`, like GDScript.
111111
///
112112
/// To specify a different class to inherit from, add `#[class(base = Base)]` as an annotation on
113113
/// your `struct`:
@@ -164,7 +164,7 @@ use crate::util::ident;
164164
///
165165
/// If you want to implement your own getter and/or setter, write those as a function on your Rust
166166
/// type, expose it using `#[func]`, and annotate the field with
167-
/// `#[export(get = ..., set = ...)]`:
167+
/// `#[var(get = ..., set = ...)]`:
168168
///
169169
/// ```
170170
/// # use godot::prelude::*;
@@ -226,7 +226,7 @@ use crate::util::ident;
226226
/// }
227227
/// ```
228228
///
229-
/// If you dont also include a `#[var]` attribute, then a default one will be generated.
229+
/// If you don't also include a `#[var]` attribute, then a default one will be generated.
230230
/// `#[export]` also supports all of GDScript's annotations, in a slightly different format. The format is
231231
/// translated from an annotation by following these four rules:
232232
///
@@ -403,7 +403,7 @@ use crate::util::ident;
403403
/// ```
404404
///
405405
/// Even though this class is a `Node` and it has an init function, it still won't show up in the editor as a node you can add to a scene
406-
/// because we have added a `hide` key to the class. This will also prevent it from showing up in documentation.
406+
/// because we have added a `hidden` key to the class. This will also prevent it from showing up in documentation.
407407
///
408408
/// # Further field customization
409409
///

itest/godot/SpecialTests.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extends TestSuiteSpecial
1515
# This tests #267, which was caused by us incorrectly handing Objects when passed as arguments to virtual
1616
# methods. `_input_event` is the easiest such method to test. However it can only be triggered by letting a
1717
# full physics frame pass after calling `push_unhandled_input`. Thus we cannot use the standard API for
18-
# testing this at the moment, since we dont have any way to let frames pass in between the start and end of
18+
# testing this at the moment, since we don't have any way to let frames pass in between the start and end of
1919
# an integration test.
2020
func test_collision_object_2d_input_event():
2121
var collision_object := CollisionObject2DTest.new()

itest/rust/src/object_tests/enum_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fn enum_hash() {
6464
}
6565

6666
// Testing https://github.com/godot-rust/gdext/issues/335
67-
// This fails upon calling the function, we dont actually need to make a good call.
67+
// This fails upon calling the function, we don't actually need to make a good call.
6868
#[itest]
6969
fn add_surface_from_arrays() {
7070
let mut mesh = ArrayMesh::new();

0 commit comments

Comments
 (0)