File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
sdk/data_cosmos/src/operations Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -74,9 +74,13 @@ impl std::future::IntoFuture for GetDocumentBuilder {
74
74
}
75
75
76
76
#[ derive( Debug , Clone ) ]
77
+ // note(rylev): clippy seems to be falsely detecting that
78
+ // one of the variants is much larger than the other (which
79
+ // is not true)
80
+ #[ allow( clippy:: large_enum_variant) ]
77
81
pub enum GetDocumentResponse < T > {
78
- Found ( Box < FoundDocumentResponse < T > > ) ,
79
- NotFound ( Box < NotFoundDocumentResponse > ) ,
82
+ Found ( FoundDocumentResponse < T > ) ,
83
+ NotFound ( NotFoundDocumentResponse ) ,
80
84
}
81
85
82
86
impl < T > GetDocumentResponse < T >
@@ -92,13 +96,13 @@ where
92
96
let body = collect_pinned_stream ( pinned_stream) . await ?;
93
97
94
98
if has_been_found {
95
- Ok ( GetDocumentResponse :: Found ( Box :: new (
99
+ Ok ( GetDocumentResponse :: Found (
96
100
FoundDocumentResponse :: try_from ( & headers, body) . await ?,
97
- ) ) )
101
+ ) )
98
102
} else {
99
- Ok ( GetDocumentResponse :: NotFound ( Box :: new (
103
+ Ok ( GetDocumentResponse :: NotFound (
100
104
NotFoundDocumentResponse :: try_from ( & headers) . await ?,
101
- ) ) )
105
+ ) )
102
106
}
103
107
}
104
108
}
You can’t perform that action at this time.
0 commit comments