use crate::prelude_internal::*;

impl Value for () {
}

impl Value for &str {
	fn render(&self, fmt: &mut dyn Write) -> FmtResult {
		write!(fmt, "{self}")
	}
}

impl<const N: usize> Value for [(&str, &dyn Value); N] {
	fn lookup(&self, name: &str) -> Option<&dyn Value> {
		for (k, v) in self.iter() {
			if *k == name {
				return Some(*v);
			}
		}

		None
	}
}
