1#!/usr/bin/env bash 2# 3# Copyright 2024 The Fuchsia Authors 4# 5# Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0 6# <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT 7# license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option. 8# This file may not be copied, modified, or distributed except according to 9# those terms. 10 11set -eo pipefail 12files=$(find . -iname '*.rs' -type f -not -path './target/*') 13# check that find succeeded 14if [[ -z $files ]] 15then 16 exit 1 17fi 18rustfmt --check $files >&2 19