Skip to content

Commit ece2790

Browse files
committed
Address comments
1 parent e9473af commit ece2790

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

lib/src/bolt/request/begin.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
use crate::bolt::{ExpectedResponse, Hello, Summary};
2-
use crate::routing::Route;
1+
use crate::bolt::{ExpectedResponse, Summary};
32
use crate::{Database, Version};
43
use serde::ser::SerializeMap;
54
use serde::{Deserialize, Serialize};
6-
use std::collections::HashMap;
75
use std::fmt::Display;
86

97
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -60,9 +58,9 @@ impl<'a> BeginBuilder<'a> {
6058
}
6159
}
6260

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 {
6462
self.bookmarks = bookmarks
65-
.iter()
63+
.into_iter()
6664
.map(|b| b.to_string())
6765
.collect::<Vec<String>>();
6866
self
@@ -215,7 +213,6 @@ mod tests {
215213
use crate::bolt::Message;
216214
use crate::packstream::bolt;
217215
use crate::{Database, Version};
218-
use std::collections::HashMap;
219216

220217
#[test]
221218
fn serialize() {

lib/src/messages.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl BoltRequest {
165165

166166
#[cfg_attr(
167167
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.")
169169
)]
170170
pub fn begin(db: Option<&str>) -> BoltRequest {
171171
let extra = db.into_iter().map(|db| ("db".into(), db.into())).collect();

0 commit comments

Comments
 (0)