File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
- use crate :: bolt:: { ExpectedResponse , Hello , Summary } ;
2
- use crate :: routing:: Route ;
1
+ use crate :: bolt:: { ExpectedResponse , Summary } ;
3
2
use crate :: { Database , Version } ;
4
3
use serde:: ser:: SerializeMap ;
5
4
use serde:: { Deserialize , Serialize } ;
6
- use std:: collections:: HashMap ;
7
5
use std:: fmt:: Display ;
8
6
9
7
#[ derive( Debug , Clone , PartialEq , Eq ) ]
@@ -60,9 +58,9 @@ impl<'a> BeginBuilder<'a> {
60
58
}
61
59
}
62
60
63
- pub fn with_bookmarks ( mut self , bookmarks : Vec < impl Display > ) -> Self {
61
+ pub fn with_bookmarks ( mut self , bookmarks : impl IntoIterator < Item = impl Display > ) -> Self {
64
62
self . bookmarks = bookmarks
65
- . iter ( )
63
+ . into_iter ( )
66
64
. map ( |b| b. to_string ( ) )
67
65
. collect :: < Vec < String > > ( ) ;
68
66
self
@@ -215,7 +213,6 @@ mod tests {
215
213
use crate :: bolt:: Message ;
216
214
use crate :: packstream:: bolt;
217
215
use crate :: { Database , Version } ;
218
- use std:: collections:: HashMap ;
219
216
220
217
#[ test]
221
218
fn serialize ( ) {
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ impl BoltRequest {
165
165
166
166
#[ cfg_attr(
167
167
feature = "unstable-bolt-protocol-impl-v2" ,
168
- deprecated( since = "0.9.0" , note = "Use `crate::bolt::Discard ` instead." )
168
+ deprecated( since = "0.9.0" , note = "Use `crate::bolt::Begin ` instead." )
169
169
) ]
170
170
pub fn begin ( db : Option < & str > ) -> BoltRequest {
171
171
let extra = db. into_iter ( ) . map ( |db| ( "db" . into ( ) , db. into ( ) ) ) . collect ( ) ;
You can’t perform that action at this time.
0 commit comments