diff --git a/part_4_posts_streams/src/db.rs b/part_4_posts_streams/src/db.rs index c05a9d9..84dbd1b 100644 --- a/part_4_posts_streams/src/db.rs +++ b/part_4_posts_streams/src/db.rs @@ -54,6 +54,7 @@ pub struct Post { impl Post { // Create a new instance of the Post struct. A default value of `false` is // set for `read`. + #[allow(dead_code)] pub fn new( key: String, text: String, @@ -135,6 +136,7 @@ impl Database { /// Add a post to the database by inserting an instance of the Post struct /// into the post tree. + #[allow(dead_code)] pub fn add_post(&self, public_key: &str, post: Post) -> Result> { let post_key = format!("{}_{}", public_key, post.key); debug!("Serializing post data for {} to bincode", &post_key); @@ -146,6 +148,7 @@ impl Database { /// Add a batch of posts to the database by inserting a vector of instances /// of the Post struct into the post tree. + #[allow(dead_code)] pub fn add_post_batch(&self, public_key: &str, posts: Vec) -> Result<()> { let mut post_batch = Batch::default(); diff --git a/part_4_posts_streams/src/sbot.rs b/part_4_posts_streams/src/sbot.rs index 57c7e10..ce995ce 100644 --- a/part_4_posts_streams/src/sbot.rs +++ b/part_4_posts_streams/src/sbot.rs @@ -132,6 +132,7 @@ pub async fn unfollow_if_following(remote_peer: &str) -> Result<(), String> { /// Return a stream of messages authored by the given public key. /// /// This returns all messages regardless of type. +#[allow(dead_code)] pub async fn get_message_stream( public_key: &str, sequence_number: u64, @@ -162,6 +163,7 @@ pub async fn get_name(public_key: &str) -> Result { /// Each returned vector element includes the key of the post, the content /// text, the date the post was published, the sequence number of the post /// and whether it is read or unread. +#[allow(dead_code)] pub async fn get_root_posts( history_stream: impl futures::Stream>, ) -> (u64, Vec) { diff --git a/part_5_task_loop/src/db.rs b/part_5_task_loop/src/db.rs index b7d60a7..0092e25 100644 --- a/part_5_task_loop/src/db.rs +++ b/part_5_task_loop/src/db.rs @@ -155,6 +155,7 @@ impl Database { /// Add a post to the database by inserting an instance of the Post struct /// into the post tree. + #[allow(dead_code)] pub fn add_post(&self, public_key: &str, post: Post) -> Result> { let post_key = format!("{}_{}", public_key, post.key); debug!("Serializing post data for {} to bincode", &post_key); diff --git a/part_5_task_loop/src/task_loop.rs b/part_5_task_loop/src/task_loop.rs index d71282e..d03ed6f 100644 --- a/part_5_task_loop/src/task_loop.rs +++ b/part_5_task_loop/src/task_loop.rs @@ -43,6 +43,7 @@ async fn fetch_name_and_update_db(db: &Database, peer_id: String) { pub enum Task { Cancel, FetchAllPosts(String), + #[allow(dead_code)] FetchLatestName(String), } diff --git a/part_6_ui_layout/src/db.rs b/part_6_ui_layout/src/db.rs index 9e50d84..f5c21bd 100644 --- a/part_6_ui_layout/src/db.rs +++ b/part_6_ui_layout/src/db.rs @@ -176,6 +176,7 @@ impl Database { /// Add a post to the database by inserting an instance of the Post struct /// into the post tree. + #[allow(dead_code)] pub fn add_post(&self, public_key: &str, post: Post) -> Result> { let post_key = format!("{}_{}", public_key, post.key); debug!("Serializing post data for {} to bincode", &post_key); diff --git a/part_6_ui_layout/src/task_loop.rs b/part_6_ui_layout/src/task_loop.rs index d71282e..d03ed6f 100644 --- a/part_6_ui_layout/src/task_loop.rs +++ b/part_6_ui_layout/src/task_loop.rs @@ -43,6 +43,7 @@ async fn fetch_name_and_update_db(db: &Database, peer_id: String) { pub enum Task { Cancel, FetchAllPosts(String), + #[allow(dead_code)] FetchLatestName(String), } diff --git a/part_7_latest_posts/src/db.rs b/part_7_latest_posts/src/db.rs index 7fc4c49..2ab33da 100644 --- a/part_7_latest_posts/src/db.rs +++ b/part_7_latest_posts/src/db.rs @@ -187,6 +187,7 @@ impl Database { /// Add a post to the database by inserting an instance of the Post struct /// into the post tree. + #[allow(dead_code)] pub fn add_post(&self, public_key: &str, post: Post) -> Result> { let post_key = format!("{}_{}", public_key, post.key); debug!("Serializing post data for {} to bincode", &post_key); diff --git a/part_8_ui_posts/src/db.rs b/part_8_ui_posts/src/db.rs index f60a27a..b949bd4 100644 --- a/part_8_ui_posts/src/db.rs +++ b/part_8_ui_posts/src/db.rs @@ -187,6 +187,7 @@ impl Database { /// Add a post to the database by inserting an instance of the Post struct /// into the post tree. + #[allow(dead_code)] pub fn add_post(&self, public_key: &str, post: Post) -> Result> { let post_key = format!("{}_{}", public_key, post.key); debug!("Serializing post data for {} to bincode", &post_key);