-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed issue with typed builder on phantom data #80
Conversation
Fixed clippy issues
@@ -45,7 +45,7 @@ async fn test_get_url() { | |||
let conn = Connection::establish_jwt(&host, &user, &password) | |||
.await | |||
.unwrap(); | |||
let url = conn.url().clone().into_string(); | |||
let url: String = conn.url().clone().into(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed deprecation warning of the into_string
method
impl<T> Into<Result<T, ArangoError>> for Response<T> { | ||
fn into(self) -> Result<T, ArangoError> { | ||
match self { | ||
impl<T> From<Response<T>> for Result<T, ArangoError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clippy prefers From
implementations
@@ -349,7 +349,7 @@ impl<C: ClientExt> GenericConnection<C, Normal> { | |||
password: T, | |||
) -> Result<String, ClientError> { | |||
#[derive(Deserialize)] | |||
struct JWT { | |||
struct Jwt { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clippy prefers this syntax
@@ -134,7 +134,7 @@ impl<'a, C: ClientExt> Collection<C> { | |||
/// characters only. Please refer to Naming Conventions in ArangoDB for more | |||
/// information on valid collection names. | |||
pub fn name(&self) -> &str { | |||
&self.name.as_str() | |||
self.name.as_str() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The borrowing was not needed
@@ -150,7 +150,7 @@ impl<'a, __query, __count, __batch_size, __cache, __memory_limit, __ttl, __optio | |||
ttl, | |||
options, | |||
), | |||
_phantom: self._phantom, | |||
phantom: self.phantom, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typed_builder
0.9.1 requires this change
@fMeow the test failing on revision doesn't happen on ArangoDB 3.7.x and appears on 3.8.0 EDIT: It also appears on https://github.com/fMeow/arangors/runs/3419021859 so it's external to this PR |
Closes #79
Also: