ignore dead code warnings
This commit is contained in:
parent
9e86212404
commit
d7d4f0e6b3
|
@ -54,6 +54,7 @@ pub struct Post {
|
||||||
impl Post {
|
impl Post {
|
||||||
// Create a new instance of the Post struct. A default value of `false` is
|
// Create a new instance of the Post struct. A default value of `false` is
|
||||||
// set for `read`.
|
// set for `read`.
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn new(
|
pub fn new(
|
||||||
key: String,
|
key: String,
|
||||||
text: String,
|
text: String,
|
||||||
|
@ -135,6 +136,7 @@ impl Database {
|
||||||
|
|
||||||
/// Add a post to the database by inserting an instance of the Post struct
|
/// Add a post to the database by inserting an instance of the Post struct
|
||||||
/// into the post tree.
|
/// into the post tree.
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn add_post(&self, public_key: &str, post: Post) -> Result<Option<IVec>> {
|
pub fn add_post(&self, public_key: &str, post: Post) -> Result<Option<IVec>> {
|
||||||
let post_key = format!("{}_{}", public_key, post.key);
|
let post_key = format!("{}_{}", public_key, post.key);
|
||||||
debug!("Serializing post data for {} to bincode", &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
|
/// Add a batch of posts to the database by inserting a vector of instances
|
||||||
/// of the Post struct into the post tree.
|
/// of the Post struct into the post tree.
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn add_post_batch(&self, public_key: &str, posts: Vec<Post>) -> Result<()> {
|
pub fn add_post_batch(&self, public_key: &str, posts: Vec<Post>) -> Result<()> {
|
||||||
let mut post_batch = Batch::default();
|
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.
|
/// Return a stream of messages authored by the given public key.
|
||||||
///
|
///
|
||||||
/// This returns all messages regardless of type.
|
/// This returns all messages regardless of type.
|
||||||
|
#[allow(dead_code)]
|
||||||
pub async fn get_message_stream(
|
pub async fn get_message_stream(
|
||||||
public_key: &str,
|
public_key: &str,
|
||||||
sequence_number: u64,
|
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
|
/// 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
|
/// text, the date the post was published, the sequence number of the post
|
||||||
/// and whether it is read or unread.
|
/// and whether it is read or unread.
|
||||||
|
#[allow(dead_code)]
|
||||||
pub async fn get_root_posts(
|
pub async fn get_root_posts(
|
||||||
history_stream: impl futures::Stream<Item = Result<SsbMessageKVT, GolgiError>>,
|
history_stream: impl futures::Stream<Item = Result<SsbMessageKVT, GolgiError>>,
|
||||||
) -> (u64, Vec<Post>) {
|
) -> (u64, Vec<Post>) {
|
||||||
|
|
|
@ -155,6 +155,7 @@ impl Database {
|
||||||
|
|
||||||
/// Add a post to the database by inserting an instance of the Post struct
|
/// Add a post to the database by inserting an instance of the Post struct
|
||||||
/// into the post tree.
|
/// into the post tree.
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn add_post(&self, public_key: &str, post: Post) -> Result<Option<IVec>> {
|
pub fn add_post(&self, public_key: &str, post: Post) -> Result<Option<IVec>> {
|
||||||
let post_key = format!("{}_{}", public_key, post.key);
|
let post_key = format!("{}_{}", public_key, post.key);
|
||||||
debug!("Serializing post data for {} to bincode", &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 {
|
pub enum Task {
|
||||||
Cancel,
|
Cancel,
|
||||||
FetchAllPosts(String),
|
FetchAllPosts(String),
|
||||||
|
#[allow(dead_code)]
|
||||||
FetchLatestName(String),
|
FetchLatestName(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -176,6 +176,7 @@ impl Database {
|
||||||
|
|
||||||
/// Add a post to the database by inserting an instance of the Post struct
|
/// Add a post to the database by inserting an instance of the Post struct
|
||||||
/// into the post tree.
|
/// into the post tree.
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn add_post(&self, public_key: &str, post: Post) -> Result<Option<IVec>> {
|
pub fn add_post(&self, public_key: &str, post: Post) -> Result<Option<IVec>> {
|
||||||
let post_key = format!("{}_{}", public_key, post.key);
|
let post_key = format!("{}_{}", public_key, post.key);
|
||||||
debug!("Serializing post data for {} to bincode", &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 {
|
pub enum Task {
|
||||||
Cancel,
|
Cancel,
|
||||||
FetchAllPosts(String),
|
FetchAllPosts(String),
|
||||||
|
#[allow(dead_code)]
|
||||||
FetchLatestName(String),
|
FetchLatestName(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -187,6 +187,7 @@ impl Database {
|
||||||
|
|
||||||
/// Add a post to the database by inserting an instance of the Post struct
|
/// Add a post to the database by inserting an instance of the Post struct
|
||||||
/// into the post tree.
|
/// into the post tree.
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn add_post(&self, public_key: &str, post: Post) -> Result<Option<IVec>> {
|
pub fn add_post(&self, public_key: &str, post: Post) -> Result<Option<IVec>> {
|
||||||
let post_key = format!("{}_{}", public_key, post.key);
|
let post_key = format!("{}_{}", public_key, post.key);
|
||||||
debug!("Serializing post data for {} to bincode", &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
|
/// Add a post to the database by inserting an instance of the Post struct
|
||||||
/// into the post tree.
|
/// into the post tree.
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn add_post(&self, public_key: &str, post: Post) -> Result<Option<IVec>> {
|
pub fn add_post(&self, public_key: &str, post: Post) -> Result<Option<IVec>> {
|
||||||
let post_key = format!("{}_{}", public_key, post.key);
|
let post_key = format!("{}_{}", public_key, post.key);
|
||||||
debug!("Serializing post data for {} to bincode", &post_key);
|
debug!("Serializing post data for {} to bincode", &post_key);
|
||||||
|
|
Loading…
Reference in New Issue