mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-11-04 09:56:28 +00:00 
			
		
		
		
	fix backticks in ErrorKind::ReservedGeo display
This commit is contained in:
		@@ -159,7 +159,7 @@ impl<'a> Display for Error<'a> {
 | 
				
			|||||||
                writeln!(f, "The `_geoBoundingBox` filter expects two pairs of arguments: `_geoBoundingBox([latitude, longitude], [latitude, longitude])`.")?
 | 
					                writeln!(f, "The `_geoBoundingBox` filter expects two pairs of arguments: `_geoBoundingBox([latitude, longitude], [latitude, longitude])`.")?
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            ErrorKind::ReservedGeo(name) => {
 | 
					            ErrorKind::ReservedGeo(name) => {
 | 
				
			||||||
                writeln!(f, "`{}` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance), or _geoBoundingBox([latitude, longitude], [latitude, longitude]) built-in rules to filter on `_geo` coordinates.", name.escape_debug())?
 | 
					                writeln!(f, "`{}` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance)` or `_geoBoundingBox([latitude, longitude], [latitude, longitude])` built-in rules to filter on `_geo` coordinates.", name.escape_debug())?
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            ErrorKind::MisusedGeoRadius => {
 | 
					            ErrorKind::MisusedGeoRadius => {
 | 
				
			||||||
                writeln!(f, "The `_geoRadius` filter is an operation and can't be used as a value.")?
 | 
					                writeln!(f, "The `_geoRadius` filter is an operation and can't be used as a value.")?
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -650,32 +650,32 @@ pub mod tests {
 | 
				
			|||||||
        "###);
 | 
					        "###);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        insta::assert_display_snapshot!(p("_geoPoint(12, 13, 14)"), @r###"
 | 
					        insta::assert_display_snapshot!(p("_geoPoint(12, 13, 14)"), @r###"
 | 
				
			||||||
        `_geoPoint` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance), or _geoBoundingBox([latitude, longitude], [latitude, longitude]) built-in rules to filter on `_geo` coordinates.
 | 
					        `_geoPoint` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance)` or `_geoBoundingBox([latitude, longitude], [latitude, longitude])` built-in rules to filter on `_geo` coordinates.
 | 
				
			||||||
        1:22 _geoPoint(12, 13, 14)
 | 
					        1:22 _geoPoint(12, 13, 14)
 | 
				
			||||||
        "###);
 | 
					        "###);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        insta::assert_display_snapshot!(p("position <= _geoPoint(12, 13, 14)"), @r###"
 | 
					        insta::assert_display_snapshot!(p("position <= _geoPoint(12, 13, 14)"), @r###"
 | 
				
			||||||
        `_geoPoint` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance), or _geoBoundingBox([latitude, longitude], [latitude, longitude]) built-in rules to filter on `_geo` coordinates.
 | 
					        `_geoPoint` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance)` or `_geoBoundingBox([latitude, longitude], [latitude, longitude])` built-in rules to filter on `_geo` coordinates.
 | 
				
			||||||
        13:34 position <= _geoPoint(12, 13, 14)
 | 
					        13:34 position <= _geoPoint(12, 13, 14)
 | 
				
			||||||
        "###);
 | 
					        "###);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        insta::assert_display_snapshot!(p("_geoDistance(12, 13, 14)"), @r###"
 | 
					        insta::assert_display_snapshot!(p("_geoDistance(12, 13, 14)"), @r###"
 | 
				
			||||||
        `_geoDistance` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance), or _geoBoundingBox([latitude, longitude], [latitude, longitude]) built-in rules to filter on `_geo` coordinates.
 | 
					        `_geoDistance` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance)` or `_geoBoundingBox([latitude, longitude], [latitude, longitude])` built-in rules to filter on `_geo` coordinates.
 | 
				
			||||||
        1:25 _geoDistance(12, 13, 14)
 | 
					        1:25 _geoDistance(12, 13, 14)
 | 
				
			||||||
        "###);
 | 
					        "###);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        insta::assert_display_snapshot!(p("position <= _geoDistance(12, 13, 14)"), @r###"
 | 
					        insta::assert_display_snapshot!(p("position <= _geoDistance(12, 13, 14)"), @r###"
 | 
				
			||||||
        `_geoDistance` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance), or _geoBoundingBox([latitude, longitude], [latitude, longitude]) built-in rules to filter on `_geo` coordinates.
 | 
					        `_geoDistance` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance)` or `_geoBoundingBox([latitude, longitude], [latitude, longitude])` built-in rules to filter on `_geo` coordinates.
 | 
				
			||||||
        13:37 position <= _geoDistance(12, 13, 14)
 | 
					        13:37 position <= _geoDistance(12, 13, 14)
 | 
				
			||||||
        "###);
 | 
					        "###);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        insta::assert_display_snapshot!(p("_geo(12, 13, 14)"), @r###"
 | 
					        insta::assert_display_snapshot!(p("_geo(12, 13, 14)"), @r###"
 | 
				
			||||||
        `_geo` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance), or _geoBoundingBox([latitude, longitude], [latitude, longitude]) built-in rules to filter on `_geo` coordinates.
 | 
					        `_geo` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance)` or `_geoBoundingBox([latitude, longitude], [latitude, longitude])` built-in rules to filter on `_geo` coordinates.
 | 
				
			||||||
        1:17 _geo(12, 13, 14)
 | 
					        1:17 _geo(12, 13, 14)
 | 
				
			||||||
        "###);
 | 
					        "###);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        insta::assert_display_snapshot!(p("position <= _geo(12, 13, 14)"), @r###"
 | 
					        insta::assert_display_snapshot!(p("position <= _geo(12, 13, 14)"), @r###"
 | 
				
			||||||
        `_geo` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance), or _geoBoundingBox([latitude, longitude], [latitude, longitude]) built-in rules to filter on `_geo` coordinates.
 | 
					        `_geo` is a reserved keyword and thus can't be used as a filter expression. Use the `_geoRadius(latitude, longitude, distance)` or `_geoBoundingBox([latitude, longitude], [latitude, longitude])` built-in rules to filter on `_geo` coordinates.
 | 
				
			||||||
        13:29 position <= _geo(12, 13, 14)
 | 
					        13:29 position <= _geo(12, 13, 14)
 | 
				
			||||||
        "###);
 | 
					        "###);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user