Skip to content

Commit

Permalink
Fix broken crate links in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jf2048 authored and bilelmoussaoui committed Dec 13, 2021
1 parent 9760c25 commit d3a859b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/expressions/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ fn build_ui(app: &gtk::Application) {

metadata_expression
.chain_property::<Metadata>("title")
.chain_closure(|args| {
.chain_closure_with_callback(|args| {
let title: String = args[1].get().unwrap();
format!("Title: {}", title)
})
.bind(&title_label, "label", gtk::Widget::NONE);

metadata_expression
.chain_property::<Metadata>("last-modified")
.chain_closure_obj::<String>(closure!(
.chain_closure::<String>(closure!(
|_: gtk::ListItem, last_modified: glib::DateTime| {
format!("Last Modified: {}", last_modified.format_iso8601().unwrap())
}
Expand Down
10 changes: 6 additions & 4 deletions gtk4/src/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ impl Expression {
}

// rustdoc-stripper-ignore-next
/// Create a [`gtk::PropertyExpression`] that looks up for `property_name`
/// with self as parameter. This is useful in long chains of [`gtk::Expression`]s.
/// Create a [`PropertyExpression`](crate::PropertyExpression) that looks up for
/// `property_name` with self as parameter. This is useful in long chains of
/// [`Expression`](crate::Expression)s.
pub fn chain_property<T: IsA<glib::Object>>(
&self,
property_name: &str,
Expand Down Expand Up @@ -250,12 +251,13 @@ impl glib::value::ToValueOptional for Expression {
}

// rustdoc-stripper-ignore-next
/// Trait containing convenience methods in creating [`gtk::PropertyExpression`] that
/// Trait containing convenience methods in creating
/// [`PropertyExpression`](crate::PropertyExpression) that
/// looks up a property of a [`glib::Object`].
///
/// # Example
///
/// `label_expression` is a [`gtk::Expression`] that looks up at Button's `label`
/// `label_expression` is an [`Expression`](crate::Expression) that looks up at Button's `label`
/// property.
///
/// ```no_run
Expand Down

0 comments on commit d3a859b

Please sign in to comment.