Commit Graph

18 Commits

Author SHA1 Message Date
emilio+bugs@crisal.io
92f1a57200 Bug 1348398: Keep deriving debug in StringRepr. 2017-03-24 15:14:30 -04:00
Michael Layzell
2be5900b6b Bug 1347224 - Part 1: Expose fallible methods on the rust ns[C]String bindings, r=froydnj
This patch adds a series of fallible methods for the rust ns[C]String
bindings, as well as the `set_length` method, which is the same as the
`SetLength` method in C++. `set_length` is marked as unsafe.

The decision was made to make the fallible methods seperate from the
infallible methods, and to use seperate Rust->C++ bindings for each of
them, rather than only binding the fallible bindings, and unwrapping
them in rust-land. This is to try to match the C++ API as closely as
possible, and to ensure that the behavior matches.

MozReview-Commit-ID: FkSomkFUFGD
2017-03-20 14:40:45 -04:00
Emilio Cobos Álvarez
30bd5679fd Bug 1344209: Handle empty strings gracefully in rust nsString bindings. r=mystor
MozReview-Commit-ID: 5lI8LXwZIML
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-03 17:49:37 +01:00
Michael Layzell
59bb3b9927 Bug 1339218 - Comment wording fixup, r=me
MozReview-Commit-ID: 8T0ibqe17Ru
2017-02-15 12:10:46 -05:00
Michael Layzell
58cab3c905 Bug 1339218 - Re-introduce the ns[C]StringRepr type for use in bindings with custom destructor logic, r=froydnj
MozReview-Commit-ID: 3VUWFA5tX1L
2017-02-15 12:02:54 -05:00
Michael Layzell
c3093f17b8 Bug 1316696 - Eliminate ns{Fixed,}{C,}StringRepr from the rust bindings, r=froydnj
MozReview-Commit-ID: AMwAUq82vMo
2017-02-08 14:17:42 -05:00
Emilio Cobos Álvarez
c7cae408eb Bug 1334579: Integrate nsstring bindings with leak logging. r=mystor
MozReview-Commit-ID: 368DwwuaMqr

--HG--
extra : rebase_source : e8e2149ca7169556df668615d654423ae9080097
2017-01-27 21:12:22 +01:00
Hiroyuki Ikezoe
a4cf573971 Bug 1330824 - Add truncate for nsAString and nsACString. r=mystor
MozReview-Commit-ID: 2ND5ra3buxI
2017-01-14 15:02:14 +09:00
Michael Layzell
92086b33cd Backout of Bug 1316696 as we don't want to require rustc 1.13 yet, a=froydnj 2016-11-28 14:19:12 -05:00
Michael Layzell
a2ede4255a Bug 1316696 - Eliminate ns{Fixed,}{C,}StringRepr from the rust bindings, r=froydnj
MozReview-Commit-ID: AMwAUq82vMo
2016-11-24 13:48:38 -05:00
Michael Layzell
29905acb08 Bug 1319083 - Relax the Sized constraint on nsA[C]String::assign/append, r=froydnj
MozReview-Commit-ID: Js5GOrnqtsg
2016-11-21 10:41:48 -05:00
Michael Layzell
fb03faf0e0 Bug 1316964 - Make the append and assign methods on the rust nsstring types more generic, r=froydnj
MozReview-Commit-ID: 5y30BnUDKsT
2016-11-15 17:01:36 -05:00
Kyle Machulis
05c2031bce Bug 1313160 - Add From<&'a String> and From<&'a Vec<u8>> conversions for rust nsstring lib; r=mystor
MozReview-Commit-ID: EBHFA8sjnM6
2016-10-27 13:07:50 -07:00
Xidorn Quan
78bf314c48 Bug 1312338 part 1 - Add as_str_unchecked() to nsACString. r=mystor
MozReview-Commit-ID: 8FwxFGtnhjp

--HG--
extra : source : d91104ea4dd66d39f1d9a00eff3a2027f6870176
2016-10-25 10:19:45 +11:00
Michael Layzell
c5faf7265c Bug 1307615 - Avoid depending on potentially-undefined behavior in the rust nsstring bindings, r=froydnj
MozReview-Commit-ID: AbISqKM9hcg
2016-10-05 11:54:51 -04:00
Michael Layzell
78329bec42 Bug 1299261 - De-duplicate code in rust ns[C]String binding layout verification code, r=bholley
MozReview-Commit-ID: 1qJ2njeUrpS
2016-09-23 14:55:32 -04:00
Michael Layzell
0f0181c55e Bug 1295762 - Part 2: Add tests to ensure that the layout of rust's ns[C]String matches C++'s, r=froydnj
MozReview-Commit-ID: FH18iSXkhX5
2016-09-20 11:26:43 -04:00
Michael Layzell
dace0b2e39 Bug 1295762 - Part 1: Implement rust bindings to XPCOM's string types, r=froydnj
MozReview-Commit-ID: 7fnWSc3AzlR
2016-09-20 11:26:43 -04:00