From ebecd7e65f3dc49d73193a8fc303fd7c53e14de3 Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Fri, 16 Aug 2024 21:51:51 -0400 Subject: [PATCH] Fix issue with fetching users in seed script (#16393) Release Notes: - N/A --- crates/collab/src/seed.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/collab/src/seed.rs b/crates/collab/src/seed.rs index 7e959ac5b7..6b56f46d50 100644 --- a/crates/collab/src/seed.rs +++ b/crates/collab/src/seed.rs @@ -1,7 +1,6 @@ use crate::db::{self, ChannelRole, NewUserParams}; use anyhow::Context; -use chrono::{DateTime, Utc}; use db::Database; use serde::{de::DeserializeOwned, Deserialize}; use std::{fmt::Write, fs, path::Path}; @@ -13,7 +12,6 @@ struct GitHubUser { id: i32, login: String, email: Option, - created_at: DateTime, } #[derive(Deserialize)] @@ -131,7 +129,7 @@ pub async fn seed(config: &Config, db: &Database, force: bool) -> anyhow::Result &github_user.login, Some(github_user.id), github_user.email.as_deref(), - Some(github_user.created_at), + None, None, ) .await @@ -161,9 +159,9 @@ async fn fetch_github(client: &reqwest::Client, url: &str) .header("user-agent", "zed") .send() .await - .unwrap_or_else(|_| panic!("failed to fetch '{url}'")); + .unwrap_or_else(|error| panic!("failed to fetch '{url}': {error}")); response .json() .await - .unwrap_or_else(|_| panic!("failed to deserialize github user from '{url}'")) + .unwrap_or_else(|error| panic!("failed to deserialize github user from '{url}': {error}")) }