]> Untitled Git - lemmy.git/commitdiff
nicer string handling
authorFelix Ableitner <me@nutomic.com>
Fri, 15 Nov 2019 15:08:14 +0000 (16:08 +0100)
committerFelix Ableitner <me@nutomic.com>
Sat, 16 Nov 2019 00:31:41 +0000 (01:31 +0100)
server/src/nodeinfo.rs

index 6790c0422390f8bcaaeffbfaae8612286c782641..a406e536b39e18e0d7130a2e8e738d5792f7c941 100644 (file)
@@ -42,10 +42,10 @@ pub fn node_info() -> Result<Json<NodeInfo>, Error> {
         Err(_e) => return Err(_e)?,
     };
     let json = Json(NodeInfo {
-        version: "2.0".to_string(),
+        version: String::from("2.0"),
         software: Software {
-            name: "lemmy".to_string(),
-            version: version::VERSION.to_string(),
+            name: String::from("lemmy"),
+            version: String::from(version::VERSION),
         },
         protocols: [], // TODO: put 'activitypub' once that is implemented
         usage: Usage {