summaryrefslogtreecommitdiff
path: root/ops/op2/test_cases/sync/add_options.rs
blob: a5f2c8f4a7849d8c9e77e4bb938f7e1cd5a77d50 (plain)
1
2
3
4
5
6
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.

#[op2(core)]
pub fn op_test_add_option(a: u32, b: Option<u32>) -> u32 {
  a + b.unwrap_or(100)
}