mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 23:30:00 -04:00
squeeze the last ms of performance out of the rewriter
This commit is contained in:
parent
213f7bfa2b
commit
41acba634d
5 changed files with 31 additions and 152 deletions
|
@ -1,5 +1,9 @@
|
|||
#![allow(clippy::print_stdout)]
|
||||
use std::{env, path::Path, str::FromStr};
|
||||
use std::{
|
||||
env,
|
||||
path::Path,
|
||||
str::{from_utf8, FromStr},
|
||||
};
|
||||
|
||||
use oxc_allocator::Allocator;
|
||||
use oxc_ast::{
|
||||
|
@ -28,10 +32,15 @@ fn main() -> std::io::Result<()> {
|
|||
|
||||
println!(
|
||||
"{}",
|
||||
rewrite(
|
||||
&source_text,
|
||||
Url::from_str("https://google.com/glorngle/si.js").unwrap()
|
||||
from_utf8(
|
||||
rewrite(
|
||||
&source_text,
|
||||
Url::from_str("https://google.com/glorngle/si.js").unwrap()
|
||||
)
|
||||
.as_slice()
|
||||
)
|
||||
.unwrap()
|
||||
.to_string()
|
||||
);
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue