aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/gfx/macros.rs
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2014-03-25 12:37:49 -0400
committerbors-servo <release+servo@mozilla.com>2014-03-25 12:37:49 -0400
commit11639c34e65bedfcc34b8734e691b5b720f085e6 (patch)
treeb5e2d57d6d1ba8db1da5d03963b38e44463f70a9 /src/components/gfx/macros.rs
parent3401a568f276c55f90ec050df605492b900f79ac (diff)
parent79ca9b6eb00e5a5945f03221227a43919f67caa4 (diff)
downloadservo-11639c34e65bedfcc34b8734e691b5b720f085e6.tar.gz
servo-11639c34e65bedfcc34b8734e691b5b720f085e6.zip
auto merge of #1958 : mbrubeck/servo/macro-crate, r=kmcallister
This moves the bitfield! macro into a new shared `macros` crate as suggested in #1882.
Diffstat (limited to 'src/components/gfx/macros.rs')
-rw-r--r--src/components/gfx/macros.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/components/gfx/macros.rs b/src/components/gfx/macros.rs
deleted file mode 100644
index 2edf8111732..00000000000
--- a/src/components/gfx/macros.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#[macro_escape];
-
-macro_rules! bitfield(
- ($bitfieldname:ident, $getter:ident, $setter:ident, $value:expr) => (
- impl $bitfieldname {
- #[inline]
- pub fn $getter(self) -> bool {
- let $bitfieldname(this) = self;
- (this & $value) != 0
- }
-
- #[inline]
- pub fn $setter(&mut self, value: bool) {
- let $bitfieldname(this) = *self;
- *self = $bitfieldname((this & !$value) | (if value { $value } else { 0 }))
- }
- }
- )
-)
-