Skip to content

Commit

Permalink
Add From<T> for Response<T> (#1064)
Browse files Browse the repository at this point in the history
Co-authored-by: tottoto <[email protected]>
  • Loading branch information
amrhassan and tottoto authored Jan 31, 2025
1 parent 86815d8 commit c9c17c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tonic/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ impl<T> Response<T> {
}
}

impl<T> From<T> for Response<T> {
fn from(inner: T) -> Self {
Response::new(inner)
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit c9c17c7

Please sign in to comment.