enable doc_markdown lint

This commit is contained in:
Charles Hall 2024-05-14 16:34:10 -07:00
parent 0f2cf26a36
commit da440934bd
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
21 changed files with 51 additions and 46 deletions

View file

@ -10,7 +10,7 @@ pub(crate) trait Data: Send + Sync {
content_type: Option<&str>,
) -> Result<Vec<u8>>;
/// Returns content_disposition, content_type and the metadata key.
/// Returns `content_disposition`, `content_type` and the `metadata` key.
fn search_file_metadata(
&self,
mxc: String,

View file

@ -10,7 +10,7 @@ pub(crate) trait Data: Send + Sync {
event: ReceiptEvent,
) -> Result<()>;
/// Returns an iterator over the most recent read_receipts in a room that happened after the event with id `since`.
/// Returns an iterator over the most recent read receipts in a room that happened after the event with id `since`.
#[allow(clippy::type_complexity)]
fn readreceipts_since<'a>(
&'a self,

View file

@ -12,7 +12,7 @@ pub(crate) struct Service {
}
impl Service {
/// Sets a user as typing until the timeout timestamp is reached or roomtyping_remove is
/// Sets a user as typing until the timeout timestamp is reached or `roomtyping_remove` is
/// called.
pub(crate) async fn typing_add(
&self,

View file

@ -42,7 +42,7 @@ impl Service {
self.db.get_statekey_from_short(shortstatekey)
}
/// Returns (shortstatehash, already_existed)
/// Returns `(shortstatehash, already_existed)`
pub(crate) fn get_or_create_shortstatehash(&self, state_hash: &[u8]) -> Result<(u64, bool)> {
self.db.get_or_create_shortstatehash(state_hash)
}

View file

@ -22,7 +22,7 @@ pub(crate) trait Data: Send + Sync {
fn get_statekey_from_short(&self, shortstatekey: u64) -> Result<(StateEventType, String)>;
/// Returns (shortstatehash, already_existed)
/// Returns `(shortstatehash, already_existed)`
fn get_or_create_shortstatehash(&self, state_hash: &[u8]) -> Result<(u64, bool)>;
fn get_shortroomid(&self, room_id: &RoomId) -> Result<Option<u64>>;

View file

@ -7,7 +7,7 @@ pub(crate) trait Data: Send + Sync {
/// Returns the last state hash key added to the db for the given room.
fn get_room_shortstatehash(&self, room_id: &RoomId) -> Result<Option<u64>>;
/// Set the state hash to a new version, but does not update state_cache.
/// Set the state hash to a new version, but does not update `state_cache`.
fn set_room_state(
&self,
room_id: &RoomId,
@ -18,7 +18,7 @@ pub(crate) trait Data: Send + Sync {
/// Associates a state with an event.
fn set_event_state(&self, shorteventid: u64, shortstatehash: u64) -> Result<()>;
/// Returns all events we would send as the prev_events of the next event.
/// Returns all events we would send as the `prev_events` of the next event.
fn get_forward_extremities(&self, room_id: &RoomId) -> Result<HashSet<Arc<EventId>>>;
/// Replace the forward extremities of the room.

View file

@ -327,12 +327,12 @@ impl Service {
self.db.set_displayname(user_id, displayname)
}
/// Get the avatar_url of a user.
/// Get the `avatar_url` of a user.
pub(crate) fn avatar_url(&self, user_id: &UserId) -> Result<Option<OwnedMxcUri>> {
self.db.avatar_url(user_id)
}
/// Sets a new avatar_url or removes it if avatar_url is None.
/// Sets a new `avatar_url` or removes it if `avatar_url` is `None`.
pub(crate) fn set_avatar_url(
&self,
user_id: &UserId,
@ -341,12 +341,12 @@ impl Service {
self.db.set_avatar_url(user_id, avatar_url)
}
/// Get the blurhash of a user.
/// Get the `blurhash` of a user.
pub(crate) fn blurhash(&self, user_id: &UserId) -> Result<Option<String>> {
self.db.blurhash(user_id)
}
/// Sets a new avatar_url or removes it if avatar_url is None.
/// Sets a new `avatar_url` or removes it if `avatar_url` is `None`.
pub(crate) fn set_blurhash(&self, user_id: &UserId, blurhash: Option<String>) -> Result<()> {
self.db.set_blurhash(user_id, blurhash)
}

View file

@ -39,19 +39,19 @@ pub(crate) trait Data: Send + Sync {
/// Returns the displayname of a user on this homeserver.
fn displayname(&self, user_id: &UserId) -> Result<Option<String>>;
/// Sets a new displayname or removes it if displayname is None. You still need to nofify all rooms of this change.
/// Sets a new `displayname` or removes it if `displayname` is `None`. You still need to nofify all rooms of this change.
fn set_displayname(&self, user_id: &UserId, displayname: Option<String>) -> Result<()>;
/// Get the avatar_url of a user.
/// Get the `avatar_url` of a user.
fn avatar_url(&self, user_id: &UserId) -> Result<Option<OwnedMxcUri>>;
/// Sets a new avatar_url or removes it if avatar_url is None.
/// Sets a new `avatar_url` or removes it if `avatar_url` is `None`.
fn set_avatar_url(&self, user_id: &UserId, avatar_url: Option<OwnedMxcUri>) -> Result<()>;
/// Get the blurhash of a user.
/// Get the `blurhash` of a user.
fn blurhash(&self, user_id: &UserId) -> Result<Option<String>>;
/// Sets a new avatar_url or removes it if avatar_url is None.
/// Sets a new `avatar_url` or removes it if `avatar_url` is `None`.
fn set_blurhash(&self, user_id: &UserId, blurhash: Option<String>) -> Result<()>;
/// Adds a new device to a user.