Skip to content

Commit

Permalink
Update actix.rs
Browse files Browse the repository at this point in the history
Removed trait requirement for using into_inner() now functions as a function.
  • Loading branch information
nMessage authored and samscott89 committed Apr 7, 2024
1 parent ec77389 commit b5bf5ef
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/actix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,10 @@ impl ResponseError for QsError {
/// ```
pub struct QsQuery<T>(T);

pub trait IntoInner<T> {
fn into_inner(self) -> T;
}

// let foo: T = QsQuery<T>.into_inner()
impl<T> IntoInner<T> for QsQuery<T> {
impl<T> QsQuery<T> {
/// Unwrap into inner T value
fn into_inner(self) -> T {
pub fn into_inner(self) -> T {
self.0
}
}
Expand Down Expand Up @@ -258,10 +254,11 @@ impl Default for QsQueryConfig {
#[derive(Debug)]
pub struct QsForm<T>(T);


// let foo: T = QsQuery<T>.into_inner()
impl<T> IntoInner<T> for QsForm<T> {
impl<T> QsForm<T> {
/// Unwrap into inner T value
fn into_inner(self) -> T {
pub fn into_inner(self) -> T {
self.0
}
}
Expand Down

0 comments on commit b5bf5ef

Please sign in to comment.