From a75b88ab86d1fde97dece0283f8f9e1eded1ff39 Mon Sep 17 00:00:00 2001 From: Paolo Barbolini Date: Sat, 3 Feb 2024 10:23:11 +0100 Subject: [PATCH] Make Subject::from_static const --- async-nats/src/subject.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/async-nats/src/subject.rs b/async-nats/src/subject.rs index 89a843840..864b5cd40 100644 --- a/async-nats/src/subject.rs +++ b/async-nats/src/subject.rs @@ -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()), }