diff options
| author | Conrad Ludgate <conrad.ludgate@truelayer.com> | 2022-04-12 23:06:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-12 23:06:19 +0100 |
| commit | a95018cc9039851e707973bc19faf907132ae4f3 (patch) | |
| tree | e135f1da64c5d020f336d437f83a333298861ca0 /atuin-client | |
| parent | fix env config parsing (#295) (diff) | |
| download | atuin-a95018cc9039851e707973bc19faf907132ae4f3.zip | |
goodbye warp, hello axum (#296)
Diffstat (limited to 'atuin-client')
| -rw-r--r-- | atuin-client/src/api_client.rs | 6 | ||||
| -rw-r--r-- | atuin-client/src/sync.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/atuin-client/src/api_client.rs b/atuin-client/src/api_client.rs index 3a4c859b..87c4b6a4 100644 --- a/atuin-client/src/api_client.rs +++ b/atuin-client/src/api_client.rs @@ -31,7 +31,7 @@ pub async fn register( username: &str, email: &str, password: &str, -) -> Result<RegisterResponse<'static>> { +) -> Result<RegisterResponse> { let mut map = HashMap::new(); map.insert("username", username); map.insert("email", email); @@ -61,7 +61,7 @@ pub async fn register( Ok(session) } -pub async fn login(address: &str, req: LoginRequest<'_>) -> Result<LoginResponse<'static>> { +pub async fn login(address: &str, req: LoginRequest) -> Result<LoginResponse> { let url = format!("{}/login", address); let client = reqwest::Client::new(); @@ -142,7 +142,7 @@ impl<'a> Client<'a> { Ok(history) } - pub async fn post_history(&self, history: &[AddHistoryRequest<'_, String>]) -> Result<()> { + pub async fn post_history(&self, history: &[AddHistoryRequest]) -> Result<()> { let url = format!("{}/history", self.sync_addr); let url = Url::parse(url.as_str())?; diff --git a/atuin-client/src/sync.rs b/atuin-client/src/sync.rs index c1c02b0a..9e749614 100644 --- a/atuin-client/src/sync.rs +++ b/atuin-client/src/sync.rs @@ -110,10 +110,10 @@ async fn sync_upload( let data = serde_json::to_string(&data)?; let add_hist = AddHistoryRequest { - id: i.id.into(), + id: i.id, timestamp: i.timestamp, data, - hostname: hash_str(&i.hostname).into(), + hostname: hash_str(&i.hostname), }; buffer.push(add_hist); |
