next.js
3fbe7292 - refactor(turbo-rcstr): Move turbo_tasks::RcStr into it's own crate (#72858)

Commit
1 year ago
refactor(turbo-rcstr): Move turbo_tasks::RcStr into it's own crate (#72858) The `RcStr` type doesn't use anything in `turbo-tasks`, so there's no reason it can't be a separate crate that doesn't depend on `turbo-tasks`. This will let it be used in wasm swc plugins, where turbo-tasks does not currently compile. Imports were automatically rewritten with: ``` # Fix imports: sg run --lang rust --pattern 'use $CRATE::{$$$PRE, RcStr};' --rewrite 'use $CRATE::{$$$PRE}; use turbo_rcstr::RcStr;' --update-all sg run --lang rust --pattern 'use $CRATE::{RcStr, $$$POST};' --rewrite 'use $CRATE::{$$$POST}; use turbo_rcstr::RcStr;' --update-all sg run --lang rust --pattern 'use $CRATE::{$$$PRE, RcStr, $$$POST};' --rewrite 'use $CRATE::{$$$PRE, $$$POST}; use turbo_rcstr::RcStr;' --update-all sg run --lang rust --pattern 'use $CRATE::RcStr;' --rewrite 'use turbo_rcstr::RcStr;' --update-all cargo fmt # Fix strings in comments: fastmod crate::RcStr turbo_rcstr::RcStr fastmod turbo_tasks::RcStr turbo_rcstr::RcStr ``` I had to manually fix the `Cargo.toml` files based on the compilation errors.
Author
bgw bgw
Parents
Loading