[fractal] fractal-matrix-api: Drop a redundant conversion
- From: Alexandre Franke <afranke src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal] fractal-matrix-api: Drop a redundant conversion
- Date: Sun, 23 Dec 2018 11:07:30 +0000 (UTC)
commit f701ea559c0ab9dde0a27b18c98711e203d77ad4
Author: Zeeshan Ali <zeenix collabora co uk>
Date: Wed Dec 12 23:05:44 2018 +0100
fractal-matrix-api: Drop a redundant conversion
This fixes this errors from clippy:
```
warning: identical conversion
--> fractal-matrix-api/src/backend/sync.rs:53:32
|
53 | params.push(("filter", String::from(filter)));
| ^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`:
`filter`
|
= help: for further information visit
https://rust-lang-nursery.github.io/rust-clippy/master/index.html#identity_conversion
```
Related: #370
fractal-matrix-api/src/backend/sync.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/fractal-matrix-api/src/backend/sync.rs b/fractal-matrix-api/src/backend/sync.rs
index a99f131..f043582 100644
--- a/fractal-matrix-api/src/backend/sync.rs
+++ b/fractal-matrix-api/src/backend/sync.rs
@@ -50,7 +50,7 @@ pub fn sync(bk: &Backend, new_since: Option<String>, initial: bool) -> Result<()
"event_fields": ["type", "content", "sender", "origin_server_ts", "event_id", "unsigned"]
}}"#, globals::PAGE_LIMIT);
- params.push(("filter", String::from(filter)));
+ params.push(("filter", filter));
params.push(("timeout", String::from("0")));
timeout = 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]