luaur-analysis 0.1.3

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Node: `cxx:Method:Luau.Analysis:Analysis/include/Luau/Set.h:48:set_insert`
//! Source: `Analysis/include/Luau/Set.h:48-53` (hand-ported)

use crate::records::set::Set;

impl<T: Clone + core::hash::Hash + PartialEq> Set<T> {
    /// C++ `template<class Iterator> void insert(Iterator begin, Iterator end)`.
    pub fn insert_range<'a, I: Iterator<Item = &'a T>>(&mut self, items: I)
    where
        T: 'a,
    {
        for it in items {
            self.insert(it);
        }
    }
}