Skip to content

Commit 76a1474

Browse files
committed
add Default implementation to NodePath
The `Default` implementation will construct a `NodePath` from a default `GodotString`.
1 parent 3c9ad03 commit 76a1474

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

gdnative-core/src/core_types/node_path.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ impl NodePath {
117117
}
118118
}
119119

120+
impl Default for NodePath {
121+
#[inline]
122+
fn default() -> Self {
123+
NodePath::new(&GodotString::default())
124+
}
125+
}
126+
120127
impl ToString for NodePath {
121128
#[inline]
122129
fn to_string(&self) -> String {

0 commit comments

Comments
 (0)