Skip to content

Commit 7562489

Browse files
committed
Fix doctests after Node::set_name() parameter change: StringName -> String
1 parent cc57510 commit 7562489

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

godot-core/src/builtin/string/string_name.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,9 @@ impl StringName {
156156
/// [`Node::set_name()`][crate::classes::Node::set_name] takes `GString`, let's pass a `StringName`:
157157
/// ```no_run
158158
/// # use godot::prelude::*;
159-
/// let name = StringName::from("my cool node");
160-
///
161-
/// let mut node = Node::new_alloc();
162-
/// node.set_name(name.arg());
159+
/// let needle = StringName::from("str");
160+
/// let haystack = GString::from("a long string");
161+
/// let found = haystack.find(needle.arg());
163162
/// ```
164163
}
165164

0 commit comments

Comments
 (0)