Comments (10)
I'm inclined to agree. Let's remove the impls for now Key::and
?
from fantoccini.
I found something relevant here:
https://std-dev-guide.rust-lang.org/code-considerations/breaking-changes/new-trait-impls.html#deref-coercion-breaks-when-a-new-impl-is-introduced
It is caused by your
impl Add<Key> for String {
type Output = String;
fn add(mut self, rhs: Key) -> Self::Output {
self.push(rhs.into());
self
}
}
impl AddAssign<Key> for String {
fn add_assign(&mut self, rhs: Key) {
self.push(rhs.into());
}
}
from fantoccini.
That's very suspicious, and I think it should be reported upstream. Those docs are specifically for the standard library, not for crate authors, and this is certainly a footgun if it applies to all crates!
cc @stevepryde as this was introduced in #151. We could totally remove these impls as they haven't been made part of a stable release yet, though that would also hurt the ergonomics of Key
a fair amount.
from fantoccini.
I added a note in rust-lang/rust#51916
from fantoccini.
Yeah that's unfortunate. I think it's better to take a small drop in ergonomics than potentially break other code just by importing fantoccini.
from fantoccini.
Hello I have an idea how to make it work and still be quite ergonomic:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=cd64fbcedcdc4e446a64d7f1c8616d43
from fantoccini.
@jonhoo should I do a pull request or will you (or @stevepryde ) do it?
from fantoccini.
It's pretty weird to have to add those &
in there, but maybe that's the best we can do for now. We should call it out in the docs for Key
explicitly at least.
Feel free to open a PR, that'll probably be faster!
from fantoccini.
Related Issues (20)
- Unable to switch window in fantoccini. HOT 1
- Bug: Search element from element does not start search from there HOT 3
- Q: transferring reqwest cookies to fantoccini HOT 1
- webdriver should not panic on invalid argument HOT 3
- Adding support for headless browser? HOT 3
- Cannot set `pageLoadOptions` in capabilities HOT 2
- WebAuthn support HOT 1
- BrowserStack requires `charset=utf-8` in `Content-Type` header on Selenium >= 4 HOT 1
- 👋 From the Selenium project! HOT 1
- Cannot access error variant information from webdriver::ErrorStatus enum HOT 1
- `Session::with_capabilities_and_connector` hides the WebDriver response HOT 1
- Error when connecting to browserstack: Session not started or terminated HOT 1
- Test whether text is visible? HOT 3
- excute() doesnt execute some scripts correctly HOT 3
- SessionNotCreated error on second run with fantoccini and geckodriver HOT 1
- How to specify options for webdriver? HOT 1
- An error occurs in the IE mode of the Edge browser. HOT 2
- Testing of client&server-side Rust interaction HOT 1
- returning Prototype.Array shows in console.log but nothing from println. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fantoccini.