Skip to content

Commit

Permalink
Fix cargo doc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vE5li committed Mar 4, 2024
1 parent 699b0f6 commit 26e2492
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 26 deletions.
7 changes: 4 additions & 3 deletions src/graphics/renderers/picker/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ enum MarkerEncoding {
/// value of 16384 for the X channel, which for Ragnarok Online is plenty.
///
/// If the `debug` feature is enabled, the most significant byte can contain a
/// value matching that of a [`MarkerEncoding`]. If that is the case, the
/// remaining 3 bytes are to be interpreted as the value of the marker.
/// value matching that of a `MarkerEncoding` (private enum). If that is the
/// case, the remaining 3 bytes are to be interpreted as the value of the
/// marker.
///
/// If the most significant bit is not set and the first byte does not match any
/// [`MarkerEncoding`], an entity is encoded. This way we can use the full 32
/// `MarkerEncoding`, an entity is encoded. This way we can use the full 32
/// bits to store the 32 bit [`EntityId`].
#[derive(Debug, PartialEq, Eq)]
pub enum PickerTarget {
Expand Down
5 changes: 2 additions & 3 deletions src/loaders/archive/native/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ use crate::loaders::archive::Archive;
use crate::loaders::{ByteStream, FixedByteSize, FromBytes};

/// Represents a GRF file. GRF Files are an archive to store game assets.
/// Each GRF contains an [`ArchiveHeader`] with metadata (number of files, size,
/// etc.) and a table [`AssetTable`] with information ([`AssetInformation`])
/// about individual assets.
/// Each GRF contains a [`Header`] with metadata (number of files, size,
/// etc.) and a table [`AssetTable`] with information about individual assets.
type FileTable = HashMap<String, FileTableRow>;

pub struct NativeArchive {
Expand Down
10 changes: 4 additions & 6 deletions src/loaders/gamefile/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Manages archives where game assets are stored and provides convenient
//! methods to retrieve each of them individually. The archives implement the
//! [`Archive`](crate::loaders::archive::Archive) trait.
//! [`Archive`] trait.
mod list;

use core::panic;
Expand Down Expand Up @@ -29,11 +29,9 @@ pub const FALLBACK_ACTIONS_FILE: &str = "data\\sprite\\npc\\missing.act";
/// Type implementing the game files loader.
///
/// Currently, there are two types implementing
/// [`Archive`](crate::loaders::archive::Archive):
/// - [`NativeArchive`](crate::loaders::archive::native::NativeArchive) -
/// Retrieve assets from GRF files.
/// - [`FolderArchive`](crate::loaders::archive::folder::FolderArchive) -
/// Retrieve assets from an OS folder.
/// [`Archive`]:
/// - [`NativeArchive`] - Retrieve assets from GRF files.
/// - [`FolderArchive`] - Retrieve assets from an OS folder.
#[derive(Default)]
pub struct GameFileLoader {
archives: Vec<Box<dyn Archive>>,
Expand Down
12 changes: 6 additions & 6 deletions src/loaders/server/client_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use super::ServiceId;
/// Usually, it uses the *clientinfo.xml* file inside the data folder.
/// But it can use *sclientinfo.xml* if this one exists.
///
/// See more: https://github.com/rathena/rathena/wiki/Clientinfo.xml
/// See more: <https://github.com/rathena/rathena/wiki/Clientinfo.xml>
#[derive(Default, Debug, Deserialize)]
pub struct ClientInfo {
/// ClientInfo's description.
Expand Down Expand Up @@ -63,7 +63,7 @@ pub struct ClientInfo {
#[serde(default, alias = "readfolder", deserialize_with = "bool_deserializer")]
pub read_folder: bool,

/// Defines each available connection on the Service Select screen
/// Defines each available connection on the Service Select screen.
#[serde(default, alias = "connection")]
pub services: Vec<Service>,
}
Expand Down Expand Up @@ -130,18 +130,18 @@ impl Service {
}
}

/// The ClientInfo Service's Account ID structure
/// The ClientInfo Service's Account ID structure.
#[derive(Debug, Clone, Default, Deserialize)]
pub struct GameMasterAccount {
/// GM's Account ID
/// GM's Account ID.
#[serde(alias = "admin")]
pub account_id: Option<i32>,
}

/// The ClientInfo Service's Loading Image structure
/// The ClientInfo Service's Loading Image structure.
#[derive(Debug, Clone, Default, Deserialize)]
pub struct LoadingImage {
/// File name
/// File name.
#[serde(alias = "image")]
pub filename: Option<String>,
}
Expand Down
16 changes: 8 additions & 8 deletions src/network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,22 @@ where

/// An event triggered by the map server.
pub enum NetworkEvent {
/// Add an entity to the list of entities that the client is aware of
/// Add an entity to the list of entities that the client is aware of.
AddEntity(EntityData),
/// Remove an entity from the list of entities that the client is aware of
/// by its id
/// by its id.
RemoveEntity(EntityId),
/// The player is pathing to a new position
/// The player is pathing to a new position.
PlayerMove(Vector2<usize>, Vector2<usize>, ClientTick),
/// An Entity nearby is pathing to a new position
/// An Entity nearby is pathing to a new position.
EntityMove(EntityId, Vector2<usize>, Vector2<usize>, ClientTick),
/// Player was moved to a new position on a different map or the current map
ChangeMap(String, Vector2<usize>),
/// Update the client side [tick
/// counter](crate::system::GameTimer::client_tick) to keep server and
/// client synchronized
/// Update the client side [`tick
/// counter`](crate::system::GameTimer::base_client_tick) to keep server and
/// client synchronized.
UpdateClientTick(ClientTick),
/// New chat message for the client
/// New chat message for the client.
ChatMessage(ChatMessage),
/// Update entity details. Mostly received when the client sends
/// [RequestDetailsPacket] after the player hovered an entity.
Expand Down

0 comments on commit 26e2492

Please sign in to comment.