Skip to content
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

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

ManevilleF
Copy link
Contributor

Closes #79

Also:

  • Fixed some clippy warnings

@@ -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();
Copy link
Contributor Author

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> {
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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()
Copy link
Contributor Author

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,
Copy link
Contributor Author

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

@ManevilleF
Copy link
Contributor Author

ManevilleF commented Sep 7, 2021

@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

@fMeow fMeow merged commit 2c31587 into fMeow:main Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit test failing on AqlQueryBuilder
2 participants