Bug 1620998 - Break the dependency between the mozannotation_client crate and the nsstring crate, so that the latter can be used outside of libxul r=afranchuk
Differential Revision: https://phabricator.services.mozilla.com/D231800
This commit is contained in:
3
Cargo.lock
generated
3
Cargo.lock
generated
@@ -4248,9 +4248,6 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "mozannotation_client"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"nsstring",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mozannotation_server"
|
||||
|
||||
@@ -8,4 +8,3 @@ license = "MPL-2.0"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
nsstring = { path = "../../../xpcom/rust/nsstring/" }
|
||||
|
||||
@@ -13,3 +13,5 @@ includes = ["nsStringFwd.h"]
|
||||
|
||||
[export.rename]
|
||||
"ThinVec" = "nsTArray"
|
||||
[export]
|
||||
exclude = ["nsCString"]
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use nsstring::nsCString;
|
||||
use std::{
|
||||
alloc::{self, Layout},
|
||||
cmp::min,
|
||||
@@ -306,6 +305,10 @@ fn store_annotation<T>(id: u32, contents: AnnotationContents, address: *const T)
|
||||
old
|
||||
}
|
||||
|
||||
// Dummy definition so that we don't have to import the nsstring crate.
|
||||
#[allow(non_camel_case_types)]
|
||||
pub struct nsCString {}
|
||||
|
||||
/// Register a pointer to an nsCString string.
|
||||
///
|
||||
/// Returns the value of the previously registered annotation or null.
|
||||
|
||||
Reference in New Issue
Block a user