From 313f6926a6608e9740924e3ff4fe6dfea2016397 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 20 Jul 2018 20:00:16 -0700 Subject: update fatcat-api lib with schema changes --- rust/fatcat-api/examples/server_lib/server.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'rust/fatcat-api/examples/server_lib') diff --git a/rust/fatcat-api/examples/server_lib/server.rs b/rust/fatcat-api/examples/server_lib/server.rs index 76d7d13c..608d715f 100644 --- a/rust/fatcat-api/examples/server_lib/server.rs +++ b/rust/fatcat-api/examples/server_lib/server.rs @@ -20,9 +20,9 @@ use fatcat::{AcceptEditgroupResponse, Api, ApiError, Context, CreateContainerBat pub struct Server; impl Api for Server { - fn accept_editgroup(&self, id: i64, context: &Context) -> Box + Send> { + fn accept_editgroup(&self, id: String, context: &Context) -> Box + Send> { let context = context.clone(); - println!("accept_editgroup({}) - X-Span-ID: {:?}", id, context.x_span_id.unwrap_or(String::from("")).clone()); + println!("accept_editgroup(\"{}\") - X-Span-ID: {:?}", id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } @@ -148,21 +148,21 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_editgroup(&self, id: i64, context: &Context) -> Box + Send> { + fn get_editgroup(&self, id: String, context: &Context) -> Box + Send> { let context = context.clone(); - println!("get_editgroup({}) - X-Span-ID: {:?}", id, context.x_span_id.unwrap_or(String::from("")).clone()); + println!("get_editgroup(\"{}\") - X-Span-ID: {:?}", id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_editor(&self, username: String, context: &Context) -> Box + Send> { + fn get_editor(&self, id: String, context: &Context) -> Box + Send> { let context = context.clone(); - println!("get_editor(\"{}\") - X-Span-ID: {:?}", username, context.x_span_id.unwrap_or(String::from("")).clone()); + println!("get_editor(\"{}\") - X-Span-ID: {:?}", id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_editor_changelog(&self, username: String, context: &Context) -> Box + Send> { + fn get_editor_changelog(&self, id: String, context: &Context) -> Box + Send> { let context = context.clone(); - println!("get_editor_changelog(\"{}\") - X-Span-ID: {:?}", username, context.x_span_id.unwrap_or(String::from("")).clone()); + println!("get_editor_changelog(\"{}\") - X-Span-ID: {:?}", id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } -- cgit v1.2.3