@@ -3,7 +3,7 @@ use crate::prelude::*;
3
3
use crate :: resources:: Database ;
4
4
use crate :: ResourceQuota ;
5
5
use azure_core:: headers:: { etag_from_headers, session_token_from_headers} ;
6
- use azure_core:: { collect_pinned_stream, Context , PipelineContext , Response as HttpResponse } ;
6
+ use azure_core:: { collect_pinned_stream, Context , Response as HttpResponse } ;
7
7
use chrono:: { DateTime , Utc } ;
8
8
9
9
#[ derive( Debug , Clone ) ]
@@ -34,15 +34,12 @@ impl CreateDatabaseBuilder {
34
34
self
35
35
}
36
36
37
- pub fn into_future ( self ) -> CreateDatabase {
38
- Box :: pin ( async {
37
+ pub fn into_future ( mut self ) -> CreateDatabase {
38
+ Box :: pin ( async move {
39
39
let mut request = self
40
40
. client
41
41
. prepare_request_pipeline ( "dbs" , http:: Method :: POST ) ;
42
42
43
- let mut pipeline_context =
44
- PipelineContext :: new ( self . context , ResourceType :: Databases . into ( ) ) ;
45
-
46
43
let body = CreateDatabaseBody {
47
44
id : self . database_name . as_str ( ) ,
48
45
} ;
@@ -52,7 +49,7 @@ impl CreateDatabaseBuilder {
52
49
let response = self
53
50
. client
54
51
. pipeline ( )
55
- . send ( & mut pipeline_context , & mut request)
52
+ . send ( & mut self . context , & mut request)
56
53
. await ?;
57
54
58
55
CreateDatabaseResponse :: try_from ( response) . await
0 commit comments