Remove ObjectProperties from example
This commit is contained in:
parent
4f4cec8fec
commit
c260993225
1 changed files with 3 additions and 2 deletions
|
@ -163,13 +163,14 @@ compiletime.
|
||||||
If you want to make a function that manipulates an Activity, but not a normal object, you could
|
If you want to make a function that manipulates an Activity, but not a normal object, you could
|
||||||
bound the function like so:
|
bound the function like so:
|
||||||
```rust
|
```rust
|
||||||
fn manipulator<T>(activity: T) -> Result<&mut ObjectProperties, SomeErrorType>
|
fn manipulator<T>(activity: T) -> Result<(), SomeErrorType>
|
||||||
where
|
where
|
||||||
T: Activity + BaseExt,
|
T: Activity + BaseExt,
|
||||||
{
|
{
|
||||||
activity
|
activity
|
||||||
.set_id("https://example.com".parse()?)
|
.set_id("https://example.com".parse()?)
|
||||||
.set_context(context())
|
.set_context(context());
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue