Skip to content

Commit 752842f

Browse files
authored
Update gdext (#26)
1 parent c1d0e96 commit 752842f

File tree

5 files changed

+15
-19
lines changed

5 files changed

+15
-19
lines changed

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ version = "0.1.0"
1010
edition = "2021"
1111

1212
[workspace.dependencies]
13-
godot = { git = "https://github.com/titannano/gdext", rev = "e3644a0348b4d6fe952007cebd94d1d3f5ddfd86" }
13+
godot = { git = "https://github.com/titannano/gdext", rev = "7fd1be904efccd71a9eb980c2e6fffa2d8705ec4" }
1414
itertools = "0.10.3"
1515
abi_stable = { version = "0.11.2", default-features = false }
1616
rand = "0.8.5"

rust-script/src/library.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,9 @@ impl RustScriptPropDesc {
125125
class_name: RStr::from_str(class_name),
126126
property_name: RString::with_capacity(self.name.len()).apply(|s| s.push_str(self.name)),
127127
usage: if self.exported {
128-
(PropertyUsageFlags::PROPERTY_USAGE_EDITOR
129-
| PropertyUsageFlags::PROPERTY_USAGE_STORAGE)
130-
.ord()
128+
(PropertyUsageFlags::EDITOR | PropertyUsageFlags::STORAGE).ord()
131129
} else {
132-
PropertyUsageFlags::PROPERTY_USAGE_NONE.ord()
130+
PropertyUsageFlags::NONE.ord()
133131
},
134132
hint: self.hint.ord(),
135133
hint_string: self.hint_string.into(),

rust-script/src/runtime/resource_saver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl IResourceFormatSaver for RustScriptResourceSaver {
2525

2626
godot_print!("saving rust script resource to: {}", path);
2727

28-
if flags as u64 & SaverFlags::FLAG_CHANGE_PATH.ord() > 0 {
28+
if flags as u64 & SaverFlags::CHANGE_PATH.ord() > 0 {
2929
script.set_path(path.clone());
3030
}
3131

rust-script/src/script_registry.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,10 @@ impl From<RemoteScriptPropertyInfo> for PropertyInfo {
111111
variant_type: value.variant_type.into(),
112112
property_name: value.property_name.into(),
113113
class_name: ClassName::from_ascii_cstr(value.class_name.as_str().as_bytes()),
114-
hint: PropertyHint::try_from_ord(value.hint)
115-
.unwrap_or(PropertyHint::PROPERTY_HINT_NONE),
114+
hint: PropertyHint::try_from_ord(value.hint).unwrap_or(PropertyHint::NONE),
116115
hint_string: value.hint_string.into(),
117116
usage: PropertyUsageFlags::try_from_ord(value.usage)
118-
.unwrap_or(PropertyUsageFlags::PROPERTY_USAGE_NONE),
117+
.unwrap_or(PropertyUsageFlags::NONE),
119118
}
120119
}
121120
}
@@ -141,8 +140,7 @@ impl From<RemoteScriptMethodInfo> for MethodInfo {
141140
return_type: value.return_type.into(),
142141
arguments: value.arguments.into_iter().map(|arg| arg.into()).collect(),
143142
default_arguments: vec![],
144-
flags: MethodFlags::try_from_ord(value.flags)
145-
.unwrap_or(MethodFlags::METHOD_FLAGS_DEFAULT),
143+
flags: MethodFlags::try_from_ord(value.flags).unwrap_or(MethodFlags::DEFAULT),
146144
}
147145
}
148146
}

0 commit comments

Comments
 (0)