microsoft/qdk

Public

mirrored from https://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
d069216bcbafa58dbc339aa8cb5d58ba26b7aa14

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

compiler/qsc_codegen/src/lib.rs

20lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#![warn(clippy::mod_module_files, clippy::pedantic, clippy::unwrap_used)]
5
6#[must_use]
7pub fn add(left: usize, right: usize) -> usize {
8 left + right
9}
10
11#[cfg(test)]
12mod tests {
13 use super::*;
14
15 #[test]
16 fn it_works() {
17 let result = add(2, 2);
18 assert_eq!(result, 4);
19 }
20}