From 94131908f00a8cbb714f3a93066e2a83dfc1c5b3 Mon Sep 17 00:00:00 2001 From: Austin Hellyer Date: Tue, 24 Jan 2017 12:07:41 -0800 Subject: Fix docs links --- src/utils/builder/create_invite.rs | 4 ++-- src/utils/builder/create_message.rs | 4 ++-- src/utils/builder/edit_channel.rs | 6 +++--- src/utils/builder/edit_profile.rs | 2 +- src/utils/builder/edit_role.rs | 14 ++++++++------ src/utils/builder/execute_webhook.rs | 4 ++-- src/utils/builder/search.rs | 4 +++- 7 files changed, 21 insertions(+), 17 deletions(-) (limited to 'src/utils/builder') diff --git a/src/utils/builder/create_invite.rs b/src/utils/builder/create_invite.rs index c8e175a..0f16b27 100644 --- a/src/utils/builder/create_invite.rs +++ b/src/utils/builder/create_invite.rs @@ -26,8 +26,8 @@ use std::default::Default; /// }); /// ``` /// -/// [`Context::create_invite`]: ../client/struct.Context.html#method.create_invite -/// [`RichInvite`]: ../model/struct.Invite.html +/// [`Context::create_invite`]: ../../client/struct.Context.html#method.create_invite +/// [`RichInvite`]: ../../model/struct.Invite.html pub struct CreateInvite(pub ObjectBuilder); impl CreateInvite { diff --git a/src/utils/builder/create_message.rs b/src/utils/builder/create_message.rs index 8522130..5386c78 100644 --- a/src/utils/builder/create_message.rs +++ b/src/utils/builder/create_message.rs @@ -3,7 +3,7 @@ use std::collections::BTreeMap; use std::default::Default; use super::CreateEmbed; -/// A builder to specify the contents of an [`rest::create_message`] request, +/// A builder to specify the contents of an [`rest::send_message`] request, /// primarily meant for use through [`Context::send_message`]. /// /// There are two situations where different field requirements are present: @@ -31,7 +31,7 @@ use super::CreateEmbed; /// [`Context::send_message`]: ../../client/struct.Context.html#method.send_message /// [`content`]: #method.content /// [`embed`]: #method.embed -/// [`rest::create_message`]: ../../client/rest/fn.create_message.html +/// [`rest::send_message`]: ../../client/rest/fn.send_message.html pub struct CreateMessage(pub BTreeMap); impl CreateMessage { diff --git a/src/utils/builder/edit_channel.rs b/src/utils/builder/edit_channel.rs index 1fd1b5c..e136cbf 100644 --- a/src/utils/builder/edit_channel.rs +++ b/src/utils/builder/edit_channel.rs @@ -31,7 +31,7 @@ impl EditChannel { /// /// This is for [voice] channels only. /// - /// [voice]: ../model/enum.ChannelType.html#variant.Voice + /// [voice]: ../../model/enum.ChannelType.html#variant.Voice pub fn bitrate(self, bitrate: u64) -> Self { EditChannel(self.0.insert("bitrate", bitrate)) } @@ -54,7 +54,7 @@ impl EditChannel { /// /// This is for [text] channels only. /// - /// [text]: ../model/enum.ChannelType.html#variant.Text + /// [text]: ../../model/enum.ChannelType.html#variant.Text pub fn topic(self, topic: &str) -> Self { EditChannel(self.0.insert("topic", topic)) } @@ -63,7 +63,7 @@ impl EditChannel { /// /// This is for [voice] channels only. /// - /// [voice]: ../model/enum.ChannelType.html#variant.Voice + /// [voice]: ../../model/enum.ChannelType.html#variant.Voice pub fn user_limit(self, user_limit: u64) -> Self { EditChannel(self.0.insert("user_limit", user_limit)) } diff --git a/src/utils/builder/edit_profile.rs b/src/utils/builder/edit_profile.rs index 46dad20..4d25f00 100644 --- a/src/utils/builder/edit_profile.rs +++ b/src/utils/builder/edit_profile.rs @@ -32,7 +32,7 @@ impl EditProfile { /// }); /// ``` /// - /// [`utils::read_image`]: ../utils/fn.read_image.html + /// [`utils::read_image`]: ../fn.read_image.html pub fn avatar(self, icon: Option<&str>) -> Self { EditProfile(self.0 .insert("avatar", diff --git a/src/utils/builder/edit_role.rs b/src/utils/builder/edit_role.rs index cea0c75..3410417 100644 --- a/src/utils/builder/edit_role.rs +++ b/src/utils/builder/edit_role.rs @@ -26,15 +26,17 @@ use ::model::{Permissions, Role, permissions}; /// .name("a test role")); /// ``` /// -/// [`Context::create_role`]: ../client/struct.Context.html#method.create_role -/// [`Context::edit_role`]: ../client/struct.Context.html#method.edit_role -/// [`Guild::create_role`]: ../model/struct.Guild.html#method.create_role -/// [`Role`]: ../model/struct.Role.html -/// [`Role::edit`]: ../model/struct.Role.html#method.edit +/// [`Context::create_role`]: ../../client/struct.Context.html#method.create_role +/// [`Context::edit_role`]: ../../client/struct.Context.html#method.edit_role +/// [`Guild::create_role`]: ../../model/struct.Guild.html#method.create_role +/// [`Role`]: ../../model/struct.Role.html +/// [`Role::edit`]: ../../model/struct.Role.html#method.edit pub struct EditRole(pub ObjectBuilder); impl EditRole { /// Creates a new builder with the values of the given [`Role`]. + /// + /// [`Role`]: ../../model/struct.Role.html pub fn new(role: &Role) -> Self { EditRole(ObjectBuilder::new() .insert("color", role.colour.0) @@ -91,7 +93,7 @@ impl Default for EditRole { /// - **permissions**: the [general permissions set] /// - **position**: 1 /// - /// [general permissions set]: ../model/permissions/fn.general.html + /// [general permissions set]: ../../model/permissions/fn.general.html fn default() -> EditRole { EditRole(ObjectBuilder::new() .insert("color", 10070709) diff --git a/src/utils/builder/execute_webhook.rs b/src/utils/builder/execute_webhook.rs index 9da701f..073dcb3 100644 --- a/src/utils/builder/execute_webhook.rs +++ b/src/utils/builder/execute_webhook.rs @@ -49,9 +49,9 @@ use std::default::Default; /// .embeds(vec![website, resources])); /// ``` /// -/// [`Webhook`]: ../model/struct.Webhook.html +/// [`Webhook`]: ../../model/struct.Webhook.html /// [`Webhook::execute`]: ../../model/struct.Webhook.html#method.execute -/// [`execute_webhook`]: ../client/rest/fn.execute_webhook.html +/// [`execute_webhook`]: ../../client/rest/fn.execute_webhook.html pub struct ExecuteWebhook(pub ObjectBuilder); impl ExecuteWebhook { diff --git a/src/utils/builder/search.rs b/src/utils/builder/search.rs index c0a7499..f6256d8 100644 --- a/src/utils/builder/search.rs +++ b/src/utils/builder/search.rs @@ -240,6 +240,8 @@ impl<'a> Search<'a> { /// /// The default value is `2`. The minimum value is `0`. The maximum value is /// `2`. + /// + /// [`Message`]: ../../model/struct.Message.html pub fn context_size(mut self, context_size: u8) -> Self { self.0.insert("context_size", context_size.to_string()); @@ -327,7 +329,7 @@ impl<'a> Search<'a> { /// The minimum value is `0`. The maximum value is `5000`. /// /// [`Message`]: ../../model/struct.Message.html - /// [`limit`]: fn.limit.html + /// [`limit`]: #method.limit pub fn offset(mut self, offset: u16) -> Self { self.0.insert("offset", offset.to_string()); -- cgit v1.2.3