Skip to content

Commit

Permalink
Make Subject::from_static const
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobarbolini authored and Jarema committed Feb 3, 2024
1 parent 00f1d56 commit a75b88a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion async-nats/src/subject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl Subject {
/// let subject = Subject::from_static("Static string");
/// assert_eq!(subject.as_str(), "Static string");
/// ```
pub fn from_static(input: &'static str) -> Self {
pub const fn from_static(input: &'static str) -> Self {
Subject {
bytes: Bytes::from_static(input.as_bytes()),
}
Expand Down

0 comments on commit a75b88a

Please sign in to comment.