(
&mut self,
cluster_name: <Raw as AstInfo>::ClusterName,
)
| 1938 | } |
| 1939 | |
| 1940 | fn fold_cluster_name( |
| 1941 | &mut self, |
| 1942 | cluster_name: <Raw as AstInfo>::ClusterName, |
| 1943 | ) -> <Aug as AstInfo>::ClusterName { |
| 1944 | match cluster_name { |
| 1945 | RawClusterName::Unresolved(ident) => { |
| 1946 | match self.catalog.resolve_cluster(Some(ident.as_str())) { |
| 1947 | Ok(cluster) => ResolvedClusterName { |
| 1948 | id: cluster.id(), |
| 1949 | print_name: None, |
| 1950 | }, |
| 1951 | Err(e) => { |
| 1952 | self.status = Err(e.into()); |
| 1953 | ResolvedClusterName { |
| 1954 | // The ID is arbitrary here; we just need some dummy |
| 1955 | // value to return. |
| 1956 | id: ClusterId::system(0).expect("0 is a valid ID"), |
| 1957 | print_name: None, |
| 1958 | } |
| 1959 | } |
| 1960 | } |
| 1961 | } |
| 1962 | RawClusterName::Resolved(ident) => match ident.parse() { |
| 1963 | Ok(id) => ResolvedClusterName { |
| 1964 | id, |
| 1965 | print_name: None, |
| 1966 | }, |
| 1967 | Err(e) => { |
| 1968 | self.status = Err(e.into()); |
| 1969 | ResolvedClusterName { |
| 1970 | // The ID is arbitrary here; we just need some dummy |
| 1971 | // value to return. |
| 1972 | id: ClusterId::system(0).expect("0 is a valid ID"), |
| 1973 | print_name: None, |
| 1974 | } |
| 1975 | } |
| 1976 | }, |
| 1977 | } |
| 1978 | } |
| 1979 | |
| 1980 | fn fold_with_option_value( |
| 1981 | &mut self, |
no test coverage detected