paulocsanz / arraystring Goto Github PK
View Code? Open in Web Editor NEWFixed capacity stack based generic string that works on stable
Fixed capacity stack based generic string that works on stable
Hello,
I'm trying to use ArrayString with diesel and it fails to derive AsChangeset.
table! {
...
users (id) {
...
password_hash -> Varchar,
...
}
}
type PasswordHash = ArrayString<U64>;
#[derive(AsChangeset, Default, Debug)]
#[table_name = "users"]
pub struct UserSettingsChangeset {
pub password_hash: Option<PasswordHash>,
...
}
will lead to:
type mismatch resolving
<&arraystring::ArrayString<arraystring::typenum::UInt<arraystring::typenum::UInt<arraystring::typenum::UInt<arraystring::typenum::UInt<arraystring::typenum::UInt<arraystring::typenum::UInt<arraystring::typenum::UTerm, arraystring::typenum::B1>, arraystring::typenum::B1>, arraystring::typenum::B0>, arraystring::typenum::B0>, arraystring::typenum::B1>, arraystring::typenum::B0>> as diesel::Expression>::SqlType == diesel::sql_types::Nullable<diesel::sql_types::Text>
diesel::sql_types::Text
, found struct diesel::sql_types::Nullable
diesel::sql_types::Text
diesel::sql_types::Nullable<diesel::sql_types::Text>
It works with normal String
...Option<T>
in AsChangeset
should just skip the field during update.
Any ideas what I'm doing wrong? Thank you
lots of unchecked functions check things anyway, it makes no sense to have an unsafe version... Can i remove them while i do a refactoring for #5 ?
I just merged my master with yours, since i didn't touch the master and the tests passed when i pushed my const N PR i can only wonder what happened...
Have you run the tests lately, did they succeed ?
This is a personal reminder, but if anyone wants to do it first feel free.
there is a lot of redundant code in the CacheString
we could use delegate to do some of that, or other means.
I wonder whether it'd be possible to substitute the typenum
crate with the subset of const generics stabilized since Rust 1.51.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.