diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-07-01 16:07:05 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-01 22:07:05 +0000 |
commit | 6afdcf59b80b4a3ecf60f220ddff14f4309133d0 (patch) | |
tree | d6a6dad1945430e161fba9e86d93fe3d8893d89c /ops/op2/test_cases/sync/string_ref.rs | |
parent | 0f719aa79c2b471815c9d21014b37719c6557c1b (diff) |
refactor(ops): op2 supports strings in argument and return position (#19613)
Support strings (&str, String, and Cow) in the argument position and String in the return position. Avoids
copies where possible, though this is not always something we can do.
Diffstat (limited to 'ops/op2/test_cases/sync/string_ref.rs')
-rw-r--r-- | ops/op2/test_cases/sync/string_ref.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ops/op2/test_cases/sync/string_ref.rs b/ops/op2/test_cases/sync/string_ref.rs new file mode 100644 index 000000000..a7efa9f0c --- /dev/null +++ b/ops/op2/test_cases/sync/string_ref.rs @@ -0,0 +1,4 @@ +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + +#[op2(fast)] +fn op_string_owned(#[string] s: &str) -> u32 {} |