Skip to content

Commit

Permalink
Merge pull request #995 from sdroege/remove-setvalueoptional-trait-bound
Browse files Browse the repository at this point in the history
This is not needed any longer
  • Loading branch information
sdroege committed Nov 19, 2020
2 parents 1ae9689 + 80b31bd commit 062b3d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion src/analysis/properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ fn analyze_property(
imports.add("glib::Value");
if set_bound.is_some() {
imports.add("glib::object::IsA");
imports.add("glib::value::SetValueOptional");
if !*nullable {
//TODO: support nonnulable setter if found any
warn!(
Expand Down
5 changes: 1 addition & 4 deletions src/codegen/properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ fn declaration(env: &Env, prop: &Property) -> String {
bound = String::new();
String::new()
} else if let Some(ref set_bound) = prop.set_bound {
bound = format!(
"<{}: IsA<{}> + SetValueOptional>",
set_bound.alias, set_bound.type_str
);
bound = format!("<{}: IsA<{}>>", set_bound.alias, set_bound.type_str);
format!(", {}: Option<&{}>", prop.var_name, set_bound.alias)
} else {
bound = String::new();
Expand Down

0 comments on commit 062b3d6

Please sign in to comment.