@@ -14,7 +14,7 @@ use azure_core::{
14
14
http:: {
15
15
headers:: { AsHeaders , ACCEPT , CONTENT_TYPE } ,
16
16
request:: { Request , RequestContent } ,
17
- ClientMethodOptions , ClientOptions , Context , Method , Pipeline , Response , Url ,
17
+ ClientMethodOptions , ClientOptions , Method , Pipeline , Response , Url ,
18
18
} ,
19
19
Bytes , Result ,
20
20
} ;
@@ -56,7 +56,7 @@ impl Client {
56
56
options : Option < ClientRecordStartOptions < ' _ > > ,
57
57
) -> Result < RecordStartResult > {
58
58
let options = options. unwrap_or_default ( ) ;
59
- let ctx = Context :: with_context ( & options. method_options . context ) ;
59
+ let ctx = options. method_options . context . to_borrowed ( ) ;
60
60
let mut url = self . endpoint . clone ( ) ;
61
61
url = url. join ( "/Record/Start" ) ?;
62
62
let mut request = Request :: new ( url, Method :: Post ) ;
@@ -77,7 +77,7 @@ impl Client {
77
77
options : Option < ClientRecordStopOptions < ' _ > > ,
78
78
) -> Result < ( ) > {
79
79
let options = options. unwrap_or_default ( ) ;
80
- let ctx = Context :: with_context ( & options. method_options . context ) ;
80
+ let ctx = options. method_options . context . to_borrowed ( ) ;
81
81
let mut url = self . endpoint . clone ( ) ;
82
82
url = url. join ( "/Record/Stop" ) ?;
83
83
let mut request = Request :: new ( url, Method :: Post ) ;
@@ -100,7 +100,7 @@ impl Client {
100
100
stringify ! ( recording_id) ,
101
101
options. recording_id . map ( AsRef :: as_ref) ,
102
102
) ;
103
- let ctx = Context :: with_context ( & options. method_options . context ) ;
103
+ let ctx = options. method_options . context . to_borrowed ( ) ;
104
104
let mut url = self . endpoint . clone ( ) ;
105
105
url = url. join ( "/Playback/Start" ) ?;
106
106
let mut request = Request :: new ( url, Method :: Post ) ;
@@ -123,7 +123,7 @@ impl Client {
123
123
options : Option < ClientPlaybackStopOptions < ' _ > > ,
124
124
) -> Result < ( ) > {
125
125
let options = options. unwrap_or_default ( ) ;
126
- let ctx = Context :: with_context ( & options. method_options . context ) ;
126
+ let ctx = options. method_options . context . to_borrowed ( ) ;
127
127
let mut url = self . endpoint . clone ( ) ;
128
128
url = url. join ( "/Playback/Stop" ) ?;
129
129
let mut request = Request :: new ( url, Method :: Post ) ;
@@ -145,7 +145,7 @@ impl Client {
145
145
stringify ! ( recording_id) ,
146
146
options. recording_id . map ( AsRef :: as_ref) ,
147
147
) ;
148
- let ctx = Context :: with_context ( & options. method_options . context ) ;
148
+ let ctx = options. method_options . context . to_borrowed ( ) ;
149
149
let mut url = self . endpoint . clone ( ) ;
150
150
url = url. join ( "/Admin/SetMatcher" ) ?;
151
151
let mut request = Request :: new ( url, Method :: Post ) ;
@@ -174,7 +174,7 @@ impl Client {
174
174
stringify ! ( recording_id) ,
175
175
options. recording_id . map ( AsRef :: as_ref) ,
176
176
) ;
177
- let ctx = Context :: with_context ( & options. method_options . context ) ;
177
+ let ctx = options. method_options . context . to_borrowed ( ) ;
178
178
let mut url = self . endpoint . clone ( ) ;
179
179
url = url. join ( "/Admin/AddSanitizer" ) ?;
180
180
let mut request = Request :: new ( url, Method :: Post ) ;
@@ -197,7 +197,7 @@ impl Client {
197
197
stringify ! ( recording_id) ,
198
198
options. recording_id . map ( AsRef :: as_ref) ,
199
199
) ;
200
- let ctx = Context :: with_context ( & options. method_options . context ) ;
200
+ let ctx = options. method_options . context . to_borrowed ( ) ;
201
201
let mut url = self . endpoint . clone ( ) ;
202
202
url = url. join ( "/Admin/RemoveSanitizers" ) ?;
203
203
let mut request = Request :: new ( url, Method :: Post ) ;
@@ -220,7 +220,7 @@ impl Client {
220
220
stringify ! ( recording_id) ,
221
221
options. recording_id . map ( AsRef :: as_ref) ,
222
222
) ;
223
- let ctx = Context :: with_context ( & options. method_options . context ) ;
223
+ let ctx = options. method_options . context . to_borrowed ( ) ;
224
224
let mut url = self . endpoint . clone ( ) ;
225
225
url = url. join ( "/Admin/Reset" ) ?;
226
226
let mut request = Request :: new ( url, Method :: Post ) ;
0 commit comments