Skip to content

Commit 68bf17d

Browse files
authoredJun 13, 2024··
feat: Relax GrpcMethod lifetime (#1598)
1 parent 22ddcd3 commit 68bf17d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎tonic/src/extensions.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/// A gRPC Method info extension.
22
#[derive(Debug, Clone)]
3-
pub struct GrpcMethod {
4-
service: &'static str,
5-
method: &'static str,
3+
pub struct GrpcMethod<'a> {
4+
service: &'a str,
5+
method: &'a str,
66
}
77

8-
impl GrpcMethod {
8+
impl<'a> GrpcMethod<'a> {
99
/// Create a new `GrpcMethod` extension.
1010
#[doc(hidden)]
11-
pub fn new(service: &'static str, method: &'static str) -> Self {
11+
pub fn new(service: &'a str, method: &'a str) -> Self {
1212
Self { service, method }
1313
}
1414

0 commit comments

Comments
 (0)
Please sign in to comment.