13dcad92aSopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
23dcad92aSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
33dcad92aSopenharmony_ci# you may not use this file except in compliance with the License.
43dcad92aSopenharmony_ci# You may obtain a copy of the License at
53dcad92aSopenharmony_ci#
63dcad92aSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
73dcad92aSopenharmony_ci#
83dcad92aSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
93dcad92aSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
103dcad92aSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
113dcad92aSopenharmony_ci# See the License for the specific language governing permissions and
123dcad92aSopenharmony_ci# limitations under the License.
133dcad92aSopenharmony_ci
143dcad92aSopenharmony_ciimport("//build/ohos.gni")
153dcad92aSopenharmony_ci
163dcad92aSopenharmony_ciohos_cargo_crate("lib") {
173dcad92aSopenharmony_ci    crate_name = "peeking_take_while"
183dcad92aSopenharmony_ci    crate_type = "rlib"
193dcad92aSopenharmony_ci    crate_root = "src/lib.rs"
203dcad92aSopenharmony_ci
213dcad92aSopenharmony_ci    sources = ["src/lib.rs"]
223dcad92aSopenharmony_ci    edition = "2015"
233dcad92aSopenharmony_ci    cargo_pkg_version = "0.1.2"
243dcad92aSopenharmony_ci    cargo_pkg_authors = "Nick Fitzgerald <fitzgen@gmail.com>"
253dcad92aSopenharmony_ci    cargo_pkg_name = "peeking_take_while"
263dcad92aSopenharmony_ci    cargo_pkg_description = "Like `Iterator::take_while`, but calls the predicate on a peeked value. This allows you to use `Iterator::by_ref` and `Iterator::take_while` together, and still get the first value for which the `take_while` predicate returned false after dropping the `by_ref`."
273dcad92aSopenharmony_ci}
28