Skip to content

Commit 7fd0481

Browse files
bors[bot]karroffel
andauthored
Merge #626
626: add Default implementation to NodePath r=karroffel a=karroffel The `Default` implementation will construct a `NodePath` from a default `GodotString`. Co-authored-by: karroffel <[email protected]>
2 parents 3c9ad03 + 76a1474 commit 7fd0481

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)