Skip to content
Snippets Groups Projects
Commit a4c169bb authored by Éloïs's avatar Éloïs
Browse files

[feat] common-tools: add trait merge

parent 5e6a3dd7
No related branches found
No related tags found
1 merge request!149Elois/ref common tools
This commit is part of merge request !149. Comments created here will be created in the context of that merge request.
...@@ -28,4 +28,4 @@ ...@@ -28,4 +28,4 @@
pub mod fns; pub mod fns;
pub mod macros; pub mod macros;
use std::io::Write; pub mod traits;
// Copyright (C) 2019 Éloïs SANCHEZ
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//! Trait Merge.
/// Merge two instances of same type
pub trait Merge {
/// Merge two instances of same type
fn merge(self, other: Self) -> Self;
}
// Copyright (C) 2019 Éloïs SANCHEZ
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//! Common rust traits for DURS project.
pub mod merge;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment