Merge pull request 'Ignore dead code warnings' (#5) from ignore_dead_code_warning into main
Reviewed-on: #5
This commit is contained in:
commit
12fb6cd9fa
|
@ -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<Option<IVec>> {
|
||||
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<Post>) -> Result<()> {
|
||||
let mut post_batch = Batch::default();
|
||||
|
||||
|
|
|
@ -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<String, String> {
|
|||
/// 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<Item = Result<SsbMessageKVT, GolgiError>>,
|
||||
) -> (u64, Vec<Post>) {
|
||||
|
|
|
@ -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<Option<IVec>> {
|
||||
let post_key = format!("{}_{}", public_key, post.key);
|
||||
debug!("Serializing post data for {} to bincode", &post_key);
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
|
||||
|
|
|
@ -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<Option<IVec>> {
|
||||
let post_key = format!("{}_{}", public_key, post.key);
|
||||
debug!("Serializing post data for {} to bincode", &post_key);
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
|
||||
|
|
|
@ -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<Option<IVec>> {
|
||||
let post_key = format!("{}_{}", public_key, post.key);
|
||||
debug!("Serializing post data for {} to bincode", &post_key);
|
||||
|
|
|
@ -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<Option<IVec>> {
|
||||
let post_key = format!("{}_{}", public_key, post.key);
|
||||
debug!("Serializing post data for {} to bincode", &post_key);
|
||||
|
|
Loading…
Reference in New Issue