🎨 style: format codebase with cargo fmt
This commit is contained in:
committed by
Jeremiah Russell
parent
3d16bd22d1
commit
e48535c623
@@ -87,20 +87,45 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl MessageList for MockList {
|
impl MessageList for MockList {
|
||||||
async fn log_messages(&mut self) -> Result<()> { Ok(()) }
|
async fn log_messages(&mut self) -> Result<()> {
|
||||||
async fn list_messages(&mut self, _next_page_token: Option<String>) -> Result<ListMessagesResponse> { Ok(ListMessagesResponse::default()) }
|
Ok(())
|
||||||
async fn get_messages(&mut self, _pages: u32) -> Result<()> { Ok(()) }
|
}
|
||||||
fn hub(&self) -> Gmail<HttpsConnector<HttpConnector>> { panic!("not used in tests") }
|
async fn list_messages(
|
||||||
fn label_ids(&self) -> Vec<String> { self.label_ids.clone() }
|
&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> {
|
fn message_ids(&self) -> Vec<String> {
|
||||||
self.messages.iter().map(|m| m.id().to_string()).collect()
|
self.messages.iter().map(|m| m.id().to_string()).collect()
|
||||||
}
|
}
|
||||||
fn messages(&self) -> &Vec<MessageSummary> { &self.messages }
|
fn messages(&self) -> &Vec<MessageSummary> {
|
||||||
fn set_query(&mut self, query: &str) { self.query = query.to_string(); }
|
&self.messages
|
||||||
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 set_query(&mut self, query: &str) {
|
||||||
fn max_results(&self) -> u32 { self.max_results }
|
self.query = query.to_string();
|
||||||
fn set_max_results(&mut self, value: u32) { self.max_results = value; }
|
}
|
||||||
|
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]
|
#[test]
|
||||||
|
|||||||
Reference in New Issue
Block a user