Skip to content

Commit 1274f3c

Browse files
committed
Add warning signs (back) to panicking methods' docs
1 parent f67835d commit 1274f3c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

godot-core/src/builtin/collections/any_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl AnyArray {
6767
}
6868
}
6969

70-
/// Returns the value at the specified index.
70+
/// ⚠️ Returns the value at the specified index.
7171
///
7272
/// This replaces the `Index` trait, which cannot be implemented for `Array`, as it stores variants and not references.
7373
///

godot-core/src/builtin/collections/array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ impl<T: ArrayElement> Array<T> {
255255
Self::default()
256256
}
257257

258-
/// Returns the value at the specified index.
258+
/// ⚠️ Returns the value at the specified index.
259259
///
260260
/// This replaces the `Index` trait, which cannot be implemented for `Array`, as it stores variants and not references.
261261
///
@@ -319,7 +319,7 @@ impl<T: ArrayElement> Array<T> {
319319
})
320320
}
321321

322-
/// Sets the value at the specified index.
322+
/// ⚠️ Sets the value at the specified index.
323323
///
324324
/// # Panics
325325
///

godot-core/src/builtin/collections/packed_array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl<T: PackedArrayElement> PackedArray<T> {
165165
// T::op_push_back(self.as_inner(), CowArg::Owned(value));
166166
// }
167167

168-
/// Inserts a new element at a given index in the array.
168+
/// ⚠️ Inserts a new element at a given index in the array.
169169
///
170170
/// The index must be valid, or at the end of the array (`index == len()`).
171171
///
@@ -180,7 +180,7 @@ impl<T: PackedArrayElement> PackedArray<T> {
180180
T::op_insert(self.as_inner(), to_i64(index), value.into_arg());
181181
}
182182

183-
/// Removes and returns the element at the specified index. Similar to `remove_at` in
183+
/// ⚠️ Removes and returns the element at the specified index. Similar to `remove_at` in
184184
/// GDScript, but also returns the removed value.
185185
///
186186
/// On large arrays, this method is much slower than `pop_back` as it will move all the array's

0 commit comments

Comments
 (0)