These are chat archives for rust-lang/rust

Oct 2018
I want to match all thats between curly brackets
Current example gives one redundant capture, and ignores id2
Oct 25 2018 09:21 UTC
pub fn captures<'t>(&self, text: &'t str) -> Option<Captures<'t>>
Returns the capture groups corresponding to the leftmost-FIRST match in text.
Tnx @Virtuos86
Git it, have to use other iterator
Oct 25 2018 10:40 UTC
Yes, you need captures_iter.
Oct 25 2018 19:40 UTC
Hi! Does anyone know how to enable u128 on serde_json?
From in serde it looks like it should be enabled with rust>=1.26
However, it doesn't work
Oct 25 2018 20:14 UTC
@alleycat-at-git No
Not all serializers in serde_json implement serialize_{iu}128
Those are in src/value/
Not in public API
But to_value uses one
File bug for serde_json crate
Oct 25 2018 20:38 UTC
Ok, thanks, did that serde-rs/json#502
Oct 25 2018 20:54 UTC
i have 3 file and in the same directory.
How do i include code in
I was able to include in using "mod b;" but can't figure out how to include code in
Lyle Mantooth
Oct 25 2018 21:03 UTC
You can use mod a; in, and then use a; in
The contents of may need to be pub for to see them, though.
Oct 25 2018 21:06 UTC
Thanks, though that's strange, It feels like I have to change for everything.
Again for using external crates that need macro_use, I have to go back and change my file
Jason Ozias
Oct 25 2018 22:15 UTC
In the 2018 edition, the module system is a bit cleaner. You may want to check that out as well.
Lyle Mantooth
Oct 25 2018 23:45 UTC
@evnix , 1.30 landed, and lets you use foo::macro; instead of #[macro_use]
Also, putting mod a; mod b; in is a consequence of putting all your files on the same level. You could mkdir b; mv b/; mv b/ and have mod a; in b/ instead. You'd still have to be explicit with your use statements, though the paths would change then.