Comments (3)
These look to be the PRs that added support for i64
conversion and f64
conversion respectively:
https://github.com/rust-lang/rust/pull/28921/files
https://github.com/rust-lang/rust/pull/29129/files
from diesel.
@sgrif How do we get around the orphan rule here? Implementing From<i32>
for i64
or f64
produces
src/expression/extensions/interval_dsl.rs:112:1: 116:2 error: the impl does not reference any types defined in this crate; only traits defined in the current crate can be implemented for arbitrary types [E0117]
src/expression/extensions/interval_dsl.rs:112 impl From<i32> for i64 {
src/expression/extensions/interval_dsl.rs:113 fn from(small: i32) -> i64 {
src/expression/extensions/interval_dsl.rs:114 small as i64
src/expression/extensions/interval_dsl.rs:115 }
src/expression/extensions/interval_dsl.rs:116 }
Sorry if this is a super noob question, I've still got my Rust training wheels on
from diesel.
We shouldn't implement From<i32>
for them, we should stop relying on it. I think the easiest thing to do is add fn times(self, x: i32) -> Self;
to the trait, and use that instead of the *
operator.
from diesel.
Related Issues (20)
- Documentation: Improve documentation for upsert `.filter_target()` HOT 2
- splitting into multiple schema.rs HOT 1
- Interaction between `#[derive(AsChangeset)]` and macro in type position HOT 2
- SQLite + PRAGMA foreign_keys = ON => missing error HOT 9
- `.distinct_on` is limited to maximum three `.order_by`s HOT 2
- Runtime Error for count() with order_by clause combined HOT 5
- fix: `sql_query` error "`Untyped: CompatibleType<std::string::String, Pg>` is not satisfied" HOT 1
- Impossible to combine into_boxed and group_by
- Impossible to combine into_boxed and group_by
- Failed to save array of enums HOT 3
- Nullable<diesel::sqlite::sql_types::Timestamptz> throws trait not implement errors
- Segmentation Fault in R2D2 postgres (interrupted by signal 11: SIGSEGV) HOT 10
- `joinable!` is not generated for two foreign keys referencing the same table HOT 1
- Diesel-cli Can't connect to local MySQL server through socket '/tmp/mysql.sock' HOT 1
- Deserialization layer seems too permissive with regards to checking the actual types received HOT 1
- Can't use `into_boxed` after union HOT 1
- table have more than one primary_key can not use on_conflict(diesel::dsl::DuplicatedKeys) HOT 7
- No intellisense when using query dsl HOT 6
- `overflow evaluating the requirement` when writing generic diesel code HOT 1
- Pagination guide doesn't work on entity represented by joined tables HOT 2
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 diesel.