Tweak the VarMap set type. (#1758)

This commit is contained in:
Laurent Mazare
2024-02-25 20:50:08 +01:00
committed by GitHub
parent 2f22afd80e
commit 1a6043af51
4 changed files with 48 additions and 11 deletions

View File

@ -70,7 +70,7 @@ impl VarMap {
///
/// If an error is returned, some of the variables might have already been set to their new
/// values.
pub fn set<I: Iterator<Item = (K, V)>, K: AsRef<String>, V: AsRef<Tensor>>(
pub fn set<I: Iterator<Item = (K, V)>, K: AsRef<str>, V: AsRef<Tensor>>(
&mut self,
iter: I,
) -> Result<()> {