🎨 style(message-list): apply rustfmt to satisfy CI fmt check
This commit is contained in:
committed by
Jeremiah Russell
parent
0042ba271f
commit
b878ff6152
@@ -60,7 +60,6 @@ use google_gmail1::{
|
||||
hyper_util::client::legacy::connect::HttpConnector,
|
||||
};
|
||||
|
||||
|
||||
/// A trait for interacting with Gmail message lists, providing methods for
|
||||
/// retrieving, filtering, and managing collections of Gmail messages.
|
||||
///
|
||||
@@ -555,20 +554,45 @@ mod tests {
|
||||
}
|
||||
|
||||
impl MessageList for MockList {
|
||||
async fn log_messages(&mut self) -> Result<()> { Ok(()) }
|
||||
async fn list_messages(&mut self, _next_page_token: Option<String>) -> Result<ListMessagesResponse> { Ok(ListMessagesResponse::default()) }
|
||||
async fn get_messages(&mut self, _pages: u32) -> Result<()> { Ok(()) }
|
||||
fn hub(&self) -> Gmail<HttpsConnector<HttpConnector>> { panic!("not used in tests") }
|
||||
fn label_ids(&self) -> Vec<String> { self.label_ids.clone() }
|
||||
async fn log_messages(&mut self) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
async fn list_messages(
|
||||
&mut self,
|
||||
_next_page_token: Option<String>,
|
||||
) -> Result<ListMessagesResponse> {
|
||||
Ok(ListMessagesResponse::default())
|
||||
}
|
||||
async fn get_messages(&mut self, _pages: u32) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
fn hub(&self) -> Gmail<HttpsConnector<HttpConnector>> {
|
||||
panic!("not used in tests")
|
||||
}
|
||||
fn label_ids(&self) -> Vec<String> {
|
||||
self.label_ids.clone()
|
||||
}
|
||||
fn message_ids(&self) -> Vec<String> {
|
||||
self.messages.iter().map(|m| m.id().to_string()).collect()
|
||||
}
|
||||
fn messages(&self) -> &Vec<MessageSummary> { &self.messages }
|
||||
fn set_query(&mut self, query: &str) { self.query = query.to_string(); }
|
||||
fn add_labels_ids(&mut self, label_ids: &[String]) { self.label_ids.extend_from_slice(label_ids); }
|
||||
fn add_labels(&mut self, _labels: &[String]) -> Result<()> { Ok(()) }
|
||||
fn max_results(&self) -> u32 { self.max_results }
|
||||
fn set_max_results(&mut self, value: u32) { self.max_results = value; }
|
||||
fn messages(&self) -> &Vec<MessageSummary> {
|
||||
&self.messages
|
||||
}
|
||||
fn set_query(&mut self, query: &str) {
|
||||
self.query = query.to_string();
|
||||
}
|
||||
fn add_labels_ids(&mut self, label_ids: &[String]) {
|
||||
self.label_ids.extend_from_slice(label_ids);
|
||||
}
|
||||
fn add_labels(&mut self, _labels: &[String]) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
fn max_results(&self) -> u32 {
|
||||
self.max_results
|
||||
}
|
||||
fn set_max_results(&mut self, value: u32) {
|
||||
self.max_results = value;
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user