0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-12-27 01:29:19 -05:00

Move v8::string::NewStringType to v8::NewStringType

This commit is contained in:
Ryan Dahl 2019-12-04 10:10:15 -05:00 committed by Ry Dahl
parent d91f0269fa
commit 3925b8122c
2 changed files with 3 additions and 3 deletions

View file

@ -17,13 +17,13 @@ mod isolate;
mod local; mod local;
mod locker; mod locker;
mod number; mod number;
mod string;
mod string_buffer; mod string_buffer;
mod string_view; mod string_view;
mod support; mod support;
pub mod array_buffer; pub mod array_buffer;
pub mod platform; pub mod platform;
pub mod string;
// This module is intentionally named "V8" rather than "v8" to match the // This module is intentionally named "V8" rather than "v8" to match the
// C++ namespace "v8::V8". // C++ namespace "v8::V8".
#[allow(non_snake_case)] #[allow(non_snake_case)]
@ -34,6 +34,7 @@ pub use isolate::Isolate;
pub use local::Local; pub use local::Local;
pub use locker::Locker; pub use locker::Locker;
pub use number::{Integer, Number}; pub use number::{Integer, Number};
pub use string::NewStringType;
pub use string::String; pub use string::String;
pub use string_buffer::StringBuffer; pub use string_buffer::StringBuffer;
pub use string_view::StringView; pub use string_view::StringView;

View file

@ -88,8 +88,7 @@ fn test_string() {
v8::HandleScope::enter(&mut locker, |scope| { v8::HandleScope::enter(&mut locker, |scope| {
let reference = "Hello 🦕 world!"; let reference = "Hello 🦕 world!";
let local = let local =
v8::String::new(scope, reference, v8::string::NewStringType::Normal) v8::String::new(scope, reference, v8::NewStringType::Normal).unwrap();
.unwrap();
assert_eq!(reference, local.to_rust_string_lossy(scope)); assert_eq!(reference, local.to_rust_string_lossy(scope));
}); });
} }