Skip to content

Commit

Permalink
Change the return type of Route::stage_instances to &'static str (#…
Browse files Browse the repository at this point in the history
…1675)

Functions without parameters should return the static string directly.

BREAKING CHANGE: The function `Route::stage_instances` now returns
a `&'static str` instead of a `String`.
  • Loading branch information
nickelc authored and arqunis committed Mar 15, 2022
1 parent a95ac81 commit a3dd38e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/http/routing.rs
Expand Up @@ -1031,8 +1031,8 @@ impl Route {
api!("/applications/{}/guilds/{}/commands/permissions", application_id, guild_id)
}

pub fn stage_instances() -> String {
api!("/stage-instances").to_string()
pub fn stage_instances() -> &'static str {
api!("/stage-instances")
}

pub fn stage_instance(channel_id: u64) -> String {
Expand Down

0 comments on commit a3dd38e

Please sign in to comment.